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>
Brandon Williams committed
Jun 20, 2017 at 12:19 UTC
7aee274fb4f3eb8d47ec9edce7042f809ce0e579
1 file changed
+6
setup.c
+6
@@ -1079,6 +1079,12 @@ const char *setup_git_directory_gently(int *nongit_ok)
1079
die("BUG: unhandled setup_git_directory_1() result");
1080
}
1081
1082
+ /*
1083
+ * NEEDSWORK: This was a hack in order to get ls-files and grep to have
1084
+ * properly formated output when recursing submodules. Once ls-files
1085
+ * and grep have been changed to perform this recursing in-process this
1086
+ * needs to be removed.
1087
+ */
1088
env_prefix = getenv(GIT_TOPLEVEL_PREFIX_ENVIRONMENT);
1089
if (env_prefix)
1090
prefix = env_prefix;