From d4ebc36c5ee964592303c59260417b758d024c31 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 19 Dec 2006 01:28:15 -0800 Subject: 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 --- exec_cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'exec_cmd.c') 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) { -- cgit v1.2.3