summaryrefslogtreecommitdiff
path: root/t/t1514-rev-parse-push.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t1514-rev-parse-push.sh')
-rwxr-xr-xt/t1514-rev-parse-push.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t1514-rev-parse-push.sh b/t/t1514-rev-parse-push.sh
index 7214f5b33f..623a32aa6e 100755
--- a/t/t1514-rev-parse-push.sh
+++ b/t/t1514-rev-parse-push.sh
@@ -60,4 +60,10 @@ test_expect_success '@{push} with push refspecs' '
resolve topic@{push} refs/remotes/origin/magic/topic
'
+test_expect_success 'resolving @{push} fails with a detached HEAD' '
+ git checkout HEAD^0 &&
+ test_when_finished "git checkout -" &&
+ test_must_fail git rev-parse @{push}
+'
+
test_done