summaryrefslogtreecommitdiff
path: root/t/t4013/diff.format-patch_--inline_--stdout_initial..master^
diff options
context:
space:
mode:
authorLibravatar Thomas Rast <trast@student.ethz.ch>2012-06-19 22:04:57 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-06-19 14:14:17 -0700
commitb0082b9d5918e3548c987303a19de0d69bbcabaa (patch)
tree330655ea0d2f58c70331f8546d074cb09ffcc307 /t/t4013/diff.format-patch_--inline_--stdout_initial..master^
parentGit 1.7.8.6 (diff)
downloadtgif-b0082b9d5918e3548c987303a19de0d69bbcabaa.tar.xz
Demonstrate git-show is broken with ranges
The logic of git-show has remained largely unchanged since around 5d7eeee (git-show: grok blobs, trees and tags, too, 2006-12-14): start a revision walker with no_walk=1, look at its pending objects and handle them one-by-one. For commits, this means stuffing them into a new queue all alone, and running the walker. Then Linus's f222abd (Make 'git show' more useful, 2009-07-13) came along and set no_walk=0 whenever the user specifies a range. Which appears to work fine, until you actually prod it hard enough, as the preceding commit shows: UNINTERESTING commits will be marked as such, but not walked further to propagate the marks. Demonstrate this with the main tests of this patch: 'showing a range walks (Y shape)'. The Y shape of history ensures that propagating the UNINTERESTING marks is necessary to correctly exclude the main1 commit. The only example I could find actually requires that the negative revisions are listed later, and in this scenario a dotted range actually works. However, it is easy to find examples in git.git where a dotted range is wrong, e.g. $ git show v1.7.0..v1.7.1 | grep ^commit | wc -l 1297 $ git rev-list v1.7.0..v1.7.1 | wc -l 702 While there, also test a few other things that are not covered so far: the -N way of triggering a range (added in 5853cae, DWIM 'git show -5' to 'git show --do-walk -5', 2010-06-01), and the interactions of tags, commits and ranges. Pointed out by Dr_Memory on #git. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.format-patch_--inline_--stdout_initial..master^')
0 files changed, 0 insertions, 0 deletions