diff options
author | Junio C Hamano <junkio@cox.net> | 2006-12-19 01:28:15 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-12-19 01:51:51 -0800 |
commit | d4ebc36c5ee964592303c59260417b758d024c31 (patch) | |
tree | d26506bdce4e91e5eb0df875e8661fa6ac8992df /exec_cmd.c | |
parent | 75c384efb52d0e3eb1e8c2f53668b4066fe6a8d6 (diff) | |
download | git-d4ebc36c5ee964592303c59260417b758d024c31.tar.gz |
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 <junkio@cox.net>
Diffstat (limited to 'exec_cmd.c')
-rw-r--r-- | exec_cmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/exec_cmd.c b/exec_cmd.c index 5d6a1247b4..3996bce33f 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"), + getenv(EXEC_PATH_ENVIRONMENT), builtin_exec_path }; for (i = 0; i < ARRAY_SIZE(paths); ++i) { |