path: root/exec_cmd.c
diff options
authorJunio C Hamano <>2006-12-19 09:28:15 (GMT)
committerJunio C Hamano <>2006-12-19 09:51:51 (GMT)
commitd4ebc36c5ee964592303c59260417b758d024c31 (patch)
treed26506bdce4e91e5eb0df875e8661fa6ac8992df /exec_cmd.c
parent75c384efb52d0e3eb1e8c2f53668b4066fe6a8d6 (diff)
Use preprocessor constants for environment variable names.
We broke the discipline Linus set up to allow compiler help us avoid typos in environment names in the early days of git over time. This defines a handful preprocessor constants for environment variable names used in relatively core parts of the system. I've left out variable names specific to subsystems such as HTTP and SSL as I do not think they are big problems. Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'exec_cmd.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/exec_cmd.c b/exec_cmd.c
index 5d6a124..3996bce 100644
--- a/exec_cmd.c
+++ b/exec_cmd.c
@@ -21,7 +21,7 @@ const char *git_exec_path(void)
if (current_exec_path)
return current_exec_path;
- env = getenv("GIT_EXEC_PATH");
+ env = getenv(EXEC_PATH_ENVIRONMENT);
if (env && *env) {
return env;
@@ -35,7 +35,7 @@ int execv_git_cmd(const char **argv)
char git_command[PATH_MAX + 1];
int i;
const char *paths[] = { current_exec_path,
- getenv("GIT_EXEC_PATH"),
builtin_exec_path };
for (i = 0; i < ARRAY_SIZE(paths); ++i) {