aboutsummaryrefslogtreecommitdiffstats
path: root/refs.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-12-21 15:29:45 -0800
committerJunio C Hamano <gitster@pobox.com>2021-12-21 15:29:45 -0800
commit504683162642c0db86c844ea37cad339f928ea9c (patch)
tree8f4e299d182bb887caf3c07a8f8fce23b3128011 /refs.c
parentThe fourth batch (diff)
parenttmp-objdir: disable ref updates when replacing the primary odb (diff)
downloadgit-504683162642c0db86c844ea37cad339f928ea9c.tar.gz
git-504683162642c0db86c844ea37cad339f928ea9c.zip
Merge branch 'ns/tmp-objdir' into en/remerge-diff
* ns/tmp-objdir: tmp-objdir: disable ref updates when replacing the primary odb tmp-objdir: new API for creating temporary writable databases
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/refs.c b/refs.c
index 4c31795581..4da4996c4d 100644
--- a/refs.c
+++ b/refs.c
@@ -2145,7 +2145,7 @@ int ref_transaction_prepare(struct ref_transaction *transaction,
break;
}
- if (getenv(GIT_QUARANTINE_ENVIRONMENT)) {
+ if (refs->repo->objects->odb->disable_ref_updates) {
strbuf_addstr(err,
_("ref updates forbidden inside quarantine environment"));
return -1;