aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-01-15 12:26:13 -0800
committerJunio C Hamano <gitster@pobox.com>2014-01-15 15:53:51 -0800
commita74352867e689d50ee9c368f24d4a64392e27a35 (patch)
tree1569e2356883fa1bdabf282a82addc035190298a /t
parent2ac5e4470b7a17303b10ba539d8aa84e870bade9 (diff)
downloadgit-a74352867e689d50ee9c368f24d4a64392e27a35.tar.gz
git-a74352867e689d50ee9c368f24d4a64392e27a35.tar.xz
revision: propagate flag bits from tags to pointees
With the previous fix 895c5ba3 (revision: do not peel tags used in range notation, 2013-09-19), handle_revision_arg() that processes command line arguments for the "git log" family of commands no longer directly places the object pointed by the tag in the pending object array when it sees a tag object. We used to place pointee there after copying the flag bits like UNINTERESTING and SYMMETRIC_LEFT. This change meant that any flag that is relevant to later history traversal must now be propagated to the pointed objects (most often these are commits) while starting the traversal, which is partly done by handle_commit() that is called from prepare_revision_walk(). We did propagate UNINTERESTING, but did not do so for others, most notably SYMMETRIC_LEFT. This caused "git log --left-right v1.0..." (where "v1.0" is a tag) to start losing the "leftness" from the commit the tag points at. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t6000-rev-list-misc.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t6000-rev-list-misc.sh b/t/t6000-rev-list-misc.sh
index 9ad4971f8..3794e4cea 100755
--- a/t/t6000-rev-list-misc.sh
+++ b/t/t6000-rev-list-misc.sh
@@ -62,4 +62,15 @@ test_expect_success 'propagate uninteresting flag down correctly' '
test_cmp expect actual
'
+test_expect_success 'symleft flag bit is propagated down from tag' '
+ git log --format="%m %s" --left-right v1.0...master >actual &&
+ cat >expect <<-\EOF &&
+ > two
+ > one
+ < another
+ < that
+ EOF
+ test_cmp expect actual
+'
+
test_done