refs: reject ref updates while GIT_QUARANTINE_PATH is set
authorJeff King <peff@peff.net>
Mon, 10 Apr 2017 22:14:12 +0000 (18:14 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Apr 2017 01:19:18 +0000 (18:19 -0700)
commitd8f4481c4f03132174b514f428cd67d2cc0dc997
tree70b6f8f9291109936af14988d23ebed5ced643bd
parenteaeed077a69ad1e26b0c329ac0f6cbd397f5be9e
refs: reject ref updates while GIT_QUARANTINE_PATH is set

As documented in git-receive-pack(1), updating a ref from
within the pre-receive hook is dangerous and can corrupt
your repo. This patch forbids ref updates entirely during
the hook to make it harder for adventurous hook writers to
shoot themselves in the foot.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-receive-pack.txt
refs.c
t/t5547-push-quarantine.sh