diff options
author | Brandon Williams <bmwill@google.com> | 2017-08-02 21:49:23 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-02 23:26:46 +0200 |
commit | f9ee2fcdfa05586b6a4476c7aa5f4f0162e48455 (patch) | |
tree | 3e637813d4848a832c73b8839a0d85e0a527ae21 /setup.c | |
parent | submodule: merge repo_read_gitmodules and gitmodules_config (diff) | |
download | git-f9ee2fcdfa05586b6a4476c7aa5f4f0162e48455.tar.xz git-f9ee2fcdfa05586b6a4476c7aa5f4f0162e48455.zip |
grep: recurse in-process using 'struct repository'
Convert grep to use 'struct repository' which enables recursing into
submodules to be handled in-process.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'setup.c')
-rw-r--r-- | setup.c | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -1027,7 +1027,7 @@ const char *setup_git_directory_gently(int *nongit_ok) { static struct strbuf cwd = STRBUF_INIT; struct strbuf dir = STRBUF_INIT, gitdir = STRBUF_INIT; - const char *prefix, *env_prefix; + const char *prefix; /* * We may have read an incomplete configuration before @@ -1085,16 +1085,6 @@ 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; - if (prefix) setenv(GIT_PREFIX_ENVIRONMENT, prefix, 1); else |