diff options
Diffstat (limited to 't/t5547-push-quarantine.sh')
-rwxr-xr-x | t/t5547-push-quarantine.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t5547-push-quarantine.sh b/t/t5547-push-quarantine.sh index 1e5d32d068..462bfc9cba 100755 --- a/t/t5547-push-quarantine.sh +++ b/t/t5547-push-quarantine.sh @@ -33,4 +33,15 @@ test_expect_success 'rejected objects are removed' ' test_cmp expect actual ' +test_expect_success 'updating a ref from quarantine is forbidden' ' + git init --bare update.git && + write_script update.git/hooks/pre-receive <<-\EOF && + read old new refname + git update-ref refs/heads/unrelated $new + exit 1 + EOF + test_must_fail git push update.git HEAD && + git -C update.git fsck +' + test_done |