Skip to content

Commit 71a9b82

Browse files
committed
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
2 parents 9f489ac + 9f0be82 commit 71a9b82

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

t/t1506-rev-parse-diagnosis.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,24 @@ test_expect_success 'dotdot is not an empty set' '
190190
test_cmp expect actual
191191
'
192192

193+
test_expect_success 'dotdot does not peel endpoints' '
194+
git tag -a -m "annote" annotated HEAD &&
195+
A=$(git rev-parse annotated) &&
196+
H=$(git rev-parse annotated^0) &&
197+
{
198+
echo $A && echo ^$A
199+
} >expect-with-two-dots &&
200+
{
201+
echo $A && echo $A && echo ^$H
202+
} >expect-with-merge-base &&
203+
204+
git rev-parse annotated..annotated >actual-with-two-dots &&
205+
test_cmp expect-with-two-dots actual-with-two-dots &&
206+
207+
git rev-parse annotated...annotated >actual-with-merge-base &&
208+
test_cmp expect-with-merge-base actual-with-merge-base
209+
'
210+
193211
test_expect_success 'arg before dashdash must be a revision (missing)' '
194212
test_must_fail git rev-parse foobar -- 2>stderr &&
195213
test_i18ngrep "bad revision" stderr

0 commit comments

Comments
 (0)