Skip to content

Commit e34c2e0

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 722ff7f commit e34c2e0

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

cache.h

+1
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ static inline enum object_type object_type(unsigned int mode)
433433
#define GIT_GLOB_PATHSPECS_ENVIRONMENT "GIT_GLOB_PATHSPECS"
434434
#define GIT_NOGLOB_PATHSPECS_ENVIRONMENT "GIT_NOGLOB_PATHSPECS"
435435
#define GIT_ICASE_PATHSPECS_ENVIRONMENT "GIT_ICASE_PATHSPECS"
436+
#define GIT_QUARANTINE_ENVIRONMENT "GIT_QUARANTINE_PATH"
436437

437438
/*
438439
* This environment variable is expected to contain a boolean indicating

tmp-objdir.c

+2
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ struct tmp_objdir *tmp_objdir_create(void)
147147
env_append(&t->env, ALTERNATE_DB_ENVIRONMENT,
148148
absolute_path(get_object_directory()));
149149
env_replace(&t->env, DB_ENVIRONMENT, absolute_path(t->path.buf));
150+
env_replace(&t->env, GIT_QUARANTINE_ENVIRONMENT,
151+
absolute_path(t->path.buf));
150152

151153
return t;
152154
}

0 commit comments

Comments
 (0)