getenv/setenv: use constants if available

There were places using "GIT_DIR" instead of GIT_DIR_ENVIRONMENT and
"GIT_CONFIG" instead of CONFIG_ENVIRONMENT.  This makes it easier to
find all places touching an environment variable using git grep or
similar tools.

Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Matthias Lederhofer
2007-06-28 16:15:25 +02:00
committed by Junio C Hamano
parent 59c93929c8
commit 7627943a1b
2 changed files with 3 additions and 3 deletions

2
path.c
View File

@ -252,7 +252,7 @@ char *enter_repo(char *path, int strict)
if (access("objects", X_OK) == 0 && access("refs", X_OK) == 0 &&
validate_headref("HEAD") == 0) {
setenv("GIT_DIR", ".", 1);
setenv(GIT_DIR_ENVIRONMENT, ".", 1);
check_repository_format();
return path;
}