summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-06-01 06:06:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-06-01 06:06:39 (GMT)
commit7cb4a974d339d774cb439b3d8c8f41f1ca584e6f (patch)
tree08f696973a82098d0a63e6cc1153e5560e7d81e9 /t
parentcaf0c98c63ac4b79a3a2e3952863b68740face10 (diff)
parent0ed556d38f90f940fdd2d9e6360b4a7544cd34e8 (diff)
downloadgit-7cb4a974d339d774cb439b3d8c8f41f1ca584e6f.zip
git-7cb4a974d339d774cb439b3d8c8f41f1ca584e6f.tar.gz
git-7cb4a974d339d774cb439b3d8c8f41f1ca584e6f.tar.bz2
Merge branch 'en/rev-parse-invalid-range'
"git rev-parse Y..." etc. misbehaved when given endpoints were not committishes. * en/rev-parse-invalid-range: rev-parse: check lookup'ed commit references for NULL
Diffstat (limited to 't')
-rwxr-xr-xt/t6101-rev-parse-parents.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t6101-rev-parse-parents.sh b/t/t6101-rev-parse-parents.sh
index 8c61798..7683e4a 100755
--- a/t/t6101-rev-parse-parents.sh
+++ b/t/t6101-rev-parse-parents.sh
@@ -214,4 +214,12 @@ test_expect_success 'rev-list merge^-1x (garbage after ^-1)' '
test_must_fail git rev-list merge^-1x
'
+test_expect_success 'rev-parse $garbage^@ does not segfault' '
+ test_must_fail git rev-parse $EMPTY_TREE^@
+'
+
+test_expect_success 'rev-parse $garbage...$garbage does not segfault' '
+ test_must_fail git rev-parse $EMPTY_TREE...$EMPTY_BLOB
+'
+
test_done