summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-09-29 21:01:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-09-29 21:01:21 (GMT)
commit71a9b82dd4ecc167caa099ea9e8ab6138a65f5fb (patch)
tree219631c2aa7acde86b78424125876c0258feee2f
parent9f489ac6bbb755fa4c83289e44cad12f3b765d69 (diff)
parent9f0be821238fcae33f33d736d2118b4ffdcebd0c (diff)
downloadgit-71a9b82dd4ecc167caa099ea9e8ab6138a65f5fb.zip
git-71a9b82dd4ecc167caa099ea9e8ab6138a65f5fb.tar.gz
git-71a9b82dd4ecc167caa099ea9e8ab6138a65f5fb.tar.bz2
Merge branch 'jc/t1506-rev-parse-leaves-range-endpoint-unpeeled'
Test update. * jc/t1506-rev-parse-leaves-range-endpoint-unpeeled: t1506: rev-parse A..B and A...B
-rwxr-xr-xt/t1506-rev-parse-diagnosis.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t1506-rev-parse-diagnosis.sh b/t/t1506-rev-parse-diagnosis.sh
index dbf690b..3e657e6 100755
--- a/t/t1506-rev-parse-diagnosis.sh
+++ b/t/t1506-rev-parse-diagnosis.sh
@@ -190,6 +190,24 @@ test_expect_success 'dotdot is not an empty set' '
test_cmp expect actual
'
+test_expect_success 'dotdot does not peel endpoints' '
+ git tag -a -m "annote" annotated HEAD &&
+ A=$(git rev-parse annotated) &&
+ H=$(git rev-parse annotated^0) &&
+ {
+ echo $A && echo ^$A
+ } >expect-with-two-dots &&
+ {
+ echo $A && echo $A && echo ^$H
+ } >expect-with-merge-base &&
+
+ git rev-parse annotated..annotated >actual-with-two-dots &&
+ test_cmp expect-with-two-dots actual-with-two-dots &&
+
+ git rev-parse annotated...annotated >actual-with-merge-base &&
+ test_cmp expect-with-merge-base actual-with-merge-base
+'
+
test_expect_success 'arg before dashdash must be a revision (missing)' '
test_must_fail git rev-parse foobar -- 2>stderr &&
test_i18ngrep "bad revision" stderr