summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-01-18 23:12:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-01-18 23:12:14 (GMT)
commitb85f79c7dd35b495ce94bf58b61832c6030751cf (patch)
tree5b8673406674992c4aea4336b023af663e30c433 /t
parent5c924692cd1c45e9c1281516e9823f7c5c3c7cd8 (diff)
parentb10731f43dc21fa47c275052e7c074c686335cd3 (diff)
downloadgit-b85f79c7dd35b495ce94bf58b61832c6030751cf.zip
git-b85f79c7dd35b495ce94bf58b61832c6030751cf.tar.gz
git-b85f79c7dd35b495ce94bf58b61832c6030751cf.tar.bz2
Merge branch 'km/branch-get-push-while-detached'
"git <cmd> @{push}" on a detached HEAD used to segfault; it has been corrected to error out with a message. * km/branch-get-push-while-detached: branch_get_push: do not segfault when HEAD is detached
Diffstat (limited to 't')
-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 7214f5b..623a32a 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