Merge branch 'jh/add-index-entry-optim'
[gitweb.git] / refs.c
diff --git a/refs.c b/refs.c
index d1e1b4399b36746dedaabb38de2332481267ea48..a3d5f42e37345096628ab83fee629f22df1bb7b5 100644 (file)
--- 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);
 }