summaryrefslogtreecommitdiff
path: root/t/t4202-log.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-12-28 13:58:03 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-12-28 13:58:04 -0800
commit71957339da64100db4114106bbba4e9c5bcf8f86 (patch)
tree4a681fcd9d23ed82c7121c5831cd74a936beff3d /t/t4202-log.sh
parentMerge branch 'jk/symbolic-ref-maint' (diff)
parentrevision.c: propagate tag names from pending array (diff)
downloadtgif-71957339da64100db4114106bbba4e9c5bcf8f86.tar.xz
Merge branch 'jk/pending-keep-tag-name'
History traversal with "git log --source" that starts with an annotated tag failed to report the tag as "source", due to an old regression in the command line parser back in v2.2 days. * jk/pending-keep-tag-name: revision.c: propagate tag names from pending array
Diffstat (limited to 't/t4202-log.sh')
-rwxr-xr-xt/t4202-log.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index 6ede0692f6..cb82eb7e66 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -908,4 +908,33 @@ test_expect_success 'log diagnoses bogus HEAD' '
test_i18ngrep broken stderr
'
+test_expect_success 'set up --source tests' '
+ git checkout --orphan source-a &&
+ test_commit one &&
+ test_commit two &&
+ git checkout -b source-b HEAD^ &&
+ test_commit three
+'
+
+test_expect_success 'log --source paints branch names' '
+ cat >expect <<-\EOF &&
+ 09e12a9 source-b three
+ 8e393e1 source-a two
+ 1ac6c77 source-b one
+ EOF
+ git log --oneline --source source-a source-b >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'log --source paints tag names' '
+ git tag -m tagged source-tag &&
+ cat >expect <<-\EOF &&
+ 09e12a9 source-tag three
+ 8e393e1 source-a two
+ 1ac6c77 source-tag one
+ EOF
+ git log --oneline --source source-tag source-a >actual &&
+ test_cmp expect actual
+'
+
test_done