aboutsummaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-04-23 22:07:51 -0700
committerJunio C Hamano <gitster@pobox.com>2017-04-23 22:07:52 -0700
commit9f1384f711e4d04d7808d4e24860b17f656b7333 (patch)
tree05c3fabffdb57078460b3c89b6df3ae5c473c18f /refs.c
parentd7f8a37852fe26df530327b4131c92b2058ecd08 (diff)
parentd8f4481c4f03132174b514f428cd67d2cc0dc997 (diff)
downloadgit-9f1384f711e4d04d7808d4e24860b17f656b7333.tar.gz
git-9f1384f711e4d04d7808d4e24860b17f656b7333.tar.xz
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 'refs.c')
-rw-r--r--refs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/refs.c b/refs.c
index d1e1b4399..a3d5f42e3 100644
--- a/refs.c
+++ b/refs.c
@@ -1643,6 +1643,12 @@ int ref_transaction_commit(struct ref_transaction *transaction,
{
struct ref_store *refs = transaction->ref_store;
+ if (getenv(GIT_QUARANTINE_ENVIRONMENT)) {
+ strbuf_addstr(err,
+ _("ref updates forbidden inside quarantine environment"));
+ return -1;
+ }
+
return refs->be->transaction_commit(refs, transaction, err);
}