X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=setup.c;h=0717a98d16b8be3cb70b33b6dea7040694130a0b;hb=251a4951a20b23760c3ccf3f3122d4394ab37357;hp=710e2f3008c79c08cdc507288881c9a58311283a;hpb=4ca1b623865a9dc100f95a7867e35a9f73d7507a;p=git.git diff --git a/setup.c b/setup.c index 710e2f300..0717a98d1 100644 --- a/setup.c +++ b/setup.c @@ -206,7 +206,7 @@ int is_inside_work_tree(void) } /* - * set_work_tree() is only ever called if you set GIT_DIR explicitely. + * set_work_tree() is only ever called if you set GIT_DIR explicitly. * The old behaviour (which we retain here) is to set the work tree root * to the cwd, unless overridden by the config, the command line, or * GIT_WORK_TREE. @@ -404,9 +404,9 @@ const char *setup_git_directory_gently(int *nongit_ok) inside_work_tree = 0; if (offset != len) { cwd[offset] = '\0'; - setenv(GIT_DIR_ENVIRONMENT, cwd, 1); + set_git_dir(cwd); } else - setenv(GIT_DIR_ENVIRONMENT, ".", 1); + set_git_dir("."); check_repository_format_gently(nongit_ok); return NULL; }