summaryrefslogtreecommitdiff
path: root/tmp-objdir.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2016-10-03 16:49:18 -0400
committerJunio C Hamano <gitster@pobox.com>2016-10-10 13:54:02 -0700
commite34c2e010f860117dc7f0f992850dfb77ba48289 (patch)
tree9cc8daeae627859e7c5b746b94c6c011ad598d8d /tmp-objdir.c
parent722ff7f876c8a2ad99c42434f58af098e61b96e8 (diff)
downloadgit-e34c2e010f860117dc7f0f992850dfb77ba48289.tar.gz
tmp-objdir: put quarantine information in the environment
The presence of the GIT_QUARANTINE_PATH variable lets any called programs know that they're operating in a temporary object directory (and where that directory is). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tmp-objdir.c')
-rw-r--r--tmp-objdir.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tmp-objdir.c b/tmp-objdir.c
index 9443868be1..780af8e752 100644
--- a/tmp-objdir.c
+++ b/tmp-objdir.c
@@ -147,6 +147,8 @@ struct tmp_objdir *tmp_objdir_create(void)
env_append(&t->env, ALTERNATE_DB_ENVIRONMENT,
absolute_path(get_object_directory()));
env_replace(&t->env, DB_ENVIRONMENT, absolute_path(t->path.buf));
+ env_replace(&t->env, GIT_QUARANTINE_ENVIRONMENT,
+ absolute_path(t->path.buf));
return t;
}