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:
Junio C Hamano
2011-06-29 17:09:27 -07:00
5 changed files with 62 additions and 9 deletions

View File

@ -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;