Merge branch 'da/git-prefix-everywhere' into next
* da/git-prefix-everywhere: t/t7503-pre-commit-hook.sh: Add GIT_PREFIX tests git-mergetool--lib: Make vimdiff retain the current directory git: Remove handling for GIT_PREFIX setup: Provide GIT_PREFIX to built-ins
This commit is contained in:
5
setup.c
5
setup.c
@ -710,6 +710,11 @@ const char *setup_git_directory_gently(int *nongit_ok)
|
||||
const char *prefix;
|
||||
|
||||
prefix = setup_git_directory_gently_1(nongit_ok);
|
||||
if (prefix)
|
||||
setenv("GIT_PREFIX", prefix, 1);
|
||||
else
|
||||
setenv("GIT_PREFIX", "", 1);
|
||||
|
||||
if (startup_info) {
|
||||
startup_info->have_repository = !nongit_ok || !*nongit_ok;
|
||||
startup_info->prefix = prefix;
|
||||
|
Reference in New Issue
Block a user