summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Brandon Williams <bmwill@google.com>2017-06-20 12:19:33 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-06-23 18:24:34 -0700
commit7aee274fb4f3eb8d47ec9edce7042f809ce0e579 (patch)
tree38f38d47d1c17987994a922e785338d710e7f844
parentsetup: don't perform lazy initialization of repository state (diff)
downloadtgif-7aee274fb4f3eb8d47ec9edce7042f809ce0e579.tar.xz
setup: add comment indicating a hack
'GIT_TOPLEVEL_PREFIX_ENVIRONMENT' was added in (b58a68c1c setup: allow for prefix to be passed to git commands) to aid in fixing a bug where 'ls-files' and 'grep' were not able to properly recurse when called from within a subdirectory. Add a 'NEEDSWORK' comment indicating that this envvar should be removed once 'ls-files' and 'grep' can recurse in-process. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--setup.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/setup.c b/setup.c
index 24a738b0d6..b477faa442 100644
--- a/setup.c
+++ b/setup.c
@@ -1079,6 +1079,12 @@ const char *setup_git_directory_gently(int *nongit_ok)
die("BUG: unhandled setup_git_directory_1() result");
}
+ /*
+ * NEEDSWORK: This was a hack in order to get ls-files and grep to have
+ * properly formated output when recursing submodules. Once ls-files
+ * and grep have been changed to perform this recursing in-process this
+ * needs to be removed.
+ */
env_prefix = getenv(GIT_TOPLEVEL_PREFIX_ENVIRONMENT);
if (env_prefix)
prefix = env_prefix;