Replace "GIT_DIR" with GIT_DIR_ENVIRONMENT.
We tend to use the nice constant GIT_DIR_ENVIRONMENT when we are referring to the "GIT_DIR" constant, but git.c didn't do so. Now it does. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Shawn O. Pearce committed
Dec 30, 2006 at 23:29 UTC
45b097947d6297a4b3f1016b05c66cdc15b411c2
1 file changed
+3
-3
git.c
+3
-3
@@ -63,14 +63,14 @@ static int handle_options(const char*** argv, int* argc)
63
fprintf(stderr, "No directory given for --git-dir.\n" );
64
usage(git_usage_string);
65
}
66
- setenv("GIT_DIR", (*argv)[1], 1);
66
+ setenv(GIT_DIR_ENVIRONMENT, (*argv)[1], 1);
67
(*argv)++;
68
(*argc)--;
69
} else if (!strncmp(cmd, "--git-dir=", 10)) {
70
- setenv("GIT_DIR", cmd + 10, 1);
70
+ setenv(GIT_DIR_ENVIRONMENT, cmd + 10, 1);
71
} else if (!strcmp(cmd, "--bare")) {
72
static char git_dir[PATH_MAX+1];
73
- setenv("GIT_DIR", getcwd(git_dir, sizeof(git_dir)), 1);
73
+ setenv(GIT_DIR_ENVIRONMENT, getcwd(git_dir, sizeof(git_dir)), 1);
74
} else {
75
fprintf(stderr, "Unknown option: %s\n", cmd);
76
usage(git_usage_string);