summaryrefslogtreecommitdiff
path: root/t/t5547-push-quarantine.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t5547-push-quarantine.sh')
-rwxr-xr-xt/t5547-push-quarantine.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/t/t5547-push-quarantine.sh b/t/t5547-push-quarantine.sh
index af9fcd833a..faaa51ccc5 100755
--- a/t/t5547-push-quarantine.sh
+++ b/t/t5547-push-quarantine.sh
@@ -39,7 +39,7 @@ test_expect_success 'push to repo path with path separator (colon)' '
# so make it likely for us to generate a delta by having
# a non-trivial file with multiple versions.
- test-genrandom foo 4096 >file.bin &&
+ test-tool genrandom foo 4096 >file.bin &&
git add file.bin &&
git commit -m bin &&
@@ -58,4 +58,15 @@ test_expect_success 'push to repo path with path separator (colon)' '
git push "$(pwd)/xxx${pathsep}yyy.git" HEAD
'
+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