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 --- builtin-repo-config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'builtin-repo-config.c') diff --git a/builtin-repo-config.c b/builtin-repo-config.c index a38099a63..4885930ca 100644 --- a/builtin-repo-config.c +++ b/builtin-repo-config.c @@ -67,10 +67,10 @@ static int get_value(const char* key_, const char* regex_) char *global = NULL, *repo_config = NULL; const char *local; - local = getenv("GIT_CONFIG"); + local = getenv(CONFIG_ENVIRONMENT); if (!local) { const char *home = getenv("HOME"); - local = getenv("GIT_CONFIG_LOCAL"); + local = getenv(CONFIG_LOCAL_ENVIRONMENT); if (!local) local = repo_config = xstrdup(git_path("config")); if (home) -- cgit v1.2.1