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@xxxxxxxx> --- cache.h | 1 + tmp-objdir.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/cache.h b/cache.h index 607c9b5..fd81a6c 100644 --- a/cache.h +++ b/cache.h @@ -433,6 +433,7 @@ static inline enum object_type object_type(unsigned int mode) #define GIT_GLOB_PATHSPECS_ENVIRONMENT "GIT_GLOB_PATHSPECS" #define GIT_NOGLOB_PATHSPECS_ENVIRONMENT "GIT_NOGLOB_PATHSPECS" #define GIT_ICASE_PATHSPECS_ENVIRONMENT "GIT_ICASE_PATHSPECS" +#define GIT_QUARANTINE_ENVIRONMENT "GIT_QUARANTINE_PATH" /* * This environment variable is expected to contain a boolean indicating diff --git a/tmp-objdir.c b/tmp-objdir.c index c92e6cc..9f53238 100644 --- a/tmp-objdir.c +++ b/tmp-objdir.c @@ -140,6 +140,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; } -- 2.10.0.618.g82cc264