diff options
Diffstat (limited to 't/t1401-symbolic-ref.sh')
-rwxr-xr-x | t/t1401-symbolic-ref.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/t/t1401-symbolic-ref.sh b/t/t1401-symbolic-ref.sh index c7745e1..5c60d6f 100755 --- a/t/t1401-symbolic-ref.sh +++ b/t/t1401-symbolic-ref.sh @@ -106,9 +106,8 @@ test_expect_success LONG_REF 'we can parse long symbolic ref' ' ' test_expect_success 'symbolic-ref reports failure in exit code' ' - test_when_finished "rm -f .git/HEAD.lock" && - >.git/HEAD.lock && - test_must_fail git symbolic-ref HEAD refs/heads/whatever + # Create d/f conflict to simulate failure. + test_must_fail git symbolic-ref refs/heads refs/heads/foo ' test_expect_success 'symbolic-ref writes reflog entry' ' @@ -171,8 +170,8 @@ test_expect_success 'symbolic-ref refuses invalid target for non-HEAD' ' ' test_expect_success 'symbolic-ref allows top-level target for non-HEAD' ' - git symbolic-ref refs/heads/top-level FETCH_HEAD && - git update-ref FETCH_HEAD HEAD && + git symbolic-ref refs/heads/top-level ORIG_HEAD && + git update-ref ORIG_HEAD HEAD && test_cmp_rev top-level HEAD ' |