summaryrefslogtreecommitdiff
path: root/builtin-config.c
diff options
context:
space:
mode:
authorMatthias Lederhofer <matled@gmx.net>2007-06-28 16:15:25 +0200
committerJunio C Hamano <gitster@pobox.com>2007-07-02 01:33:44 -0700
commit7627943a1bb0cda6f37b66381a62facf9e200285 (patch)
tree42d37f639f6d8851a7448562b64a281de8a0d45d /builtin-config.c
parent59c93929c8b98b7be00496d61fae8979bab1841d (diff)
downloadgit-7627943a1bb0cda6f37b66381a62facf9e200285.tar.gz
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>
Diffstat (limited to 'builtin-config.c')
-rw-r--r--builtin-config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-config.c b/builtin-config.c
index 3f7cab16d5..7d2063c1d2 100644
--- a/builtin-config.c
+++ b/builtin-config.c
@@ -178,14 +178,14 @@ int cmd_config(int argc, const char **argv, const char *prefix)
char *home = getenv("HOME");
if (home) {
char *user_config = xstrdup(mkpath("%s/.gitconfig", home));
- setenv("GIT_CONFIG", user_config, 1);
+ setenv(CONFIG_ENVIRONMENT, user_config, 1);
free(user_config);
} else {
die("$HOME not set");
}
}
else if (!strcmp(argv[1], "--system"))
- setenv("GIT_CONFIG", ETC_GITCONFIG, 1);
+ setenv(CONFIG_ENVIRONMENT, ETC_GITCONFIG, 1);
else if (!strcmp(argv[1], "--null") || !strcmp(argv[1], "-z")) {
term = '\0';
delim = '\n';