summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-04-24 05:07:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-04-24 05:07:52 (GMT)
commit9f1384f711e4d04d7808d4e24860b17f656b7333 (patch)
tree05c3fabffdb57078460b3c89b6df3ae5c473c18f /t
parentd7f8a37852fe26df530327b4131c92b2058ecd08 (diff)
parentd8f4481c4f03132174b514f428cd67d2cc0dc997 (diff)
downloadgit-9f1384f711e4d04d7808d4e24860b17f656b7333.zip
git-9f1384f711e4d04d7808d4e24860b17f656b7333.tar.gz
git-9f1384f711e4d04d7808d4e24860b17f656b7333.tar.bz2
Merge branch 'jk/quarantine-received-objects'
Add finishing touches to a recent topic. * jk/quarantine-received-objects: refs: reject ref updates while GIT_QUARANTINE_PATH is set receive-pack: document user-visible quarantine effects receive-pack: drop tmp_objdir_env from run_update_hook
Diffstat (limited to 't')
-rwxr-xr-xt/t5547-push-quarantine.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t5547-push-quarantine.sh b/t/t5547-push-quarantine.sh
index af9fcd8..113c870 100755
--- a/t/t5547-push-quarantine.sh
+++ b/t/t5547-push-quarantine.sh
@@ -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