summaryrefslogtreecommitdiffstats
path: root/refs.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-01-04 01:24:14 +0100
committerJunio C Hamano <gitster@pobox.com>2022-01-04 01:24:15 +0100
commit0dc90d954db852c6604796b8d817365f94e92a16 (patch)
tree9d4cf45af85370e4e7c89e74ff6ba74b39a28579 /refs.c
parentMerge branch 'jc/unleak-log' (diff)
parenttmp-objdir: disable ref updates when replacing the primary odb (diff)
downloadgit-0dc90d954db852c6604796b8d817365f94e92a16.tar.xz
git-0dc90d954db852c6604796b8d817365f94e92a16.zip
Merge branch 'ns/tmp-objdir'
New interface into the tmp-objdir API to help in-core use of the quarantine feature. * 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;