diff options
Diffstat (limited to 't/t1403-show-ref.sh')
-rwxr-xr-x | t/t1403-show-ref.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t1403-show-ref.sh b/t/t1403-show-ref.sh index d477689e33..ec1957b709 100755 --- a/t/t1403-show-ref.sh +++ b/t/t1403-show-ref.sh @@ -268,4 +268,14 @@ test_expect_success '--exists with directory fails with generic error' ' test_cmp expect err ' +test_expect_success '--exists with non-existent special ref' ' + test_expect_code 2 git show-ref --exists FETCH_HEAD +' + +test_expect_success '--exists with existing special ref' ' + test_when_finished "rm .git/FETCH_HEAD" && + git rev-parse HEAD >.git/FETCH_HEAD && + git show-ref --exists FETCH_HEAD +' + test_done |