diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-06-01 15:06:39 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-06-01 15:06:39 +0900 |
commit | 7cb4a974d339d774cb439b3d8c8f41f1ca584e6f (patch) | |
tree | 08f696973a82098d0a63e6cc1153e5560e7d81e9 /t | |
parent | Merge branch 'ld/p4-unshelve' (diff) | |
parent | rev-parse: check lookup'ed commit references for NULL (diff) | |
download | tgif-7cb4a974d339d774cb439b3d8c8f41f1ca584e6f.tar.xz |
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-x | t/t6101-rev-parse-parents.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t6101-rev-parse-parents.sh b/t/t6101-rev-parse-parents.sh index 8c617981a3..7683e4a114 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 |