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
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user