diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-09-19 14:20:34 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-10-15 16:17:09 -0700 |
commit | 895c5ba3c1c927c68e581ebb0e13d9a123e477ab (patch) | |
tree | e0e57a94d8567bb3bc2ed20dc592455574ba7bc8 /t/t4013/diff.diff-tree_--pretty_side | |
parent | Git 1.8.0.3 (diff) | |
download | tgif-895c5ba3c1c927c68e581ebb0e13d9a123e477ab.tar.xz |
revision: do not peel tags used in range notation
A range notation "A..B" means exactly the same thing as what "^A B"
means, i.e. the set of commits that are reachable from B but not
from A. But the internal representation after the revision parser
parsed these two notations are subtly different.
- "rev-list ^A B" leaves A and B in the revs->pending.objects[]
array, with the former marked as UNINTERESTING and the revision
traversal machinery propagates the mark to underlying commit
objects A^0 and B^0.
- "rev-list A..B" peels tags and leaves A^0 (marked as
UNINTERESTING) and B^0 in revs->pending.objects[] array before
the traversal machinery kicks in.
This difference usually does not matter, but starts to matter when
the --objects option is used. For example, we see this:
$ git rev-list --objects v1.8.4^1..v1.8.4 | grep $(git rev-parse v1.8.4)
$ git rev-list --objects v1.8.4 ^v1.8.4^1 | grep $(git rev-parse v1.8.4)
04f013dc38d7512eadb915eba22efc414f18b869 v1.8.4
With the former invocation, the revision traversal machinery never
hears about the tag v1.8.4 (it only sees the result of peeling it,
i.e. the commit v1.8.4^0), and the tag itself does not appear in the
output. The latter does send the tag object itself to the output.
Make the range notation keep the unpeeled objects and feed them to
the traversal machinery to fix this inconsistency.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff-tree_--pretty_side')
0 files changed, 0 insertions, 0 deletions