From a6f7f9a32532a636bd458c7a3dc2cc16fbe237d3 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Fri, 8 Mar 2013 04:30:25 -0500 Subject: environment: add GIT_PREFIX to local_repo_env The GIT_PREFIX variable is set based on our location within the working tree. It should therefore be cleared whenever GIT_WORK_TREE is cleared. In practice, this doesn't cause any bugs, because none of the sub-programs we invoke with local_repo_env cleared actually care about GIT_PREFIX. But this is the right thing to do, and future proofs us against that assumption changing. While we're at it, let's define a GIT_PREFIX_ENVIRONMENT macro; this avoids repetition of the string literal, which can help catch any spelling mistakes in the code. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- environment.c | 1 + 1 file changed, 1 insertion(+) (limited to 'environment.c') diff --git a/environment.c b/environment.c index 81ffb4b666..4fb7ceac3a 100644 --- a/environment.c +++ b/environment.c @@ -88,6 +88,7 @@ const char * const local_repo_env[] = { GRAFT_ENVIRONMENT, INDEX_ENVIRONMENT, NO_REPLACE_OBJECTS_ENVIRONMENT, + GIT_PREFIX_ENVIRONMENT, NULL }; -- cgit v1.2.3