Message ID | 714f713ccece4a9dd167b3b73a71c068dbe91f53.1705004670.git.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | a26f1fb62bef37865dc18e010f9804172980c682 |
Headers | show |
Series | Generalize reference locking in tests | expand |
diff --git a/t/t1401-symbolic-ref.sh b/t/t1401-symbolic-ref.sh index c7745e1bf69..c67e5c134d9 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' '