summaryrefslogtreecommitdiff
path: root/grep.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-08-02 19:49:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-08-02 21:26:46 (GMT)
commitf9ee2fcdfa05586b6a4476c7aa5f4f0162e48455 (patch)
tree3e637813d4848a832c73b8839a0d85e0a527ae21 /grep.c
parent2184d4ba0cb86a7f40153cd46b03d3fa75b247d9 (diff)
downloadgit-f9ee2fcdfa05586b6a4476c7aa5f4f0162e48455.zip
git-f9ee2fcdfa05586b6a4476c7aa5f4f0162e48455.tar.gz
git-f9ee2fcdfa05586b6a4476c7aa5f4f0162e48455.tar.bz2
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 'grep.c')
-rw-r--r--grep.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/grep.c b/grep.c
index 2efec0e..45acd33 100644
--- a/grep.c
+++ b/grep.c
@@ -1927,16 +1927,6 @@ void grep_source_init(struct grep_source *gs, enum grep_source_type type,
case GREP_SOURCE_FILE:
gs->identifier = xstrdup(identifier);
break;
- case GREP_SOURCE_SUBMODULE:
- if (!identifier) {
- gs->identifier = NULL;
- break;
- }
- /*
- * FALL THROUGH
- * If the identifier is non-NULL (in the submodule case) it
- * will be a SHA1 that needs to be copied.
- */
case GREP_SOURCE_OID:
gs->identifier = oiddup(identifier);
break;
@@ -1959,7 +1949,6 @@ void grep_source_clear_data(struct grep_source *gs)
switch (gs->type) {
case GREP_SOURCE_FILE:
case GREP_SOURCE_OID:
- case GREP_SOURCE_SUBMODULE:
FREE_AND_NULL(gs->buf);
gs->size = 0;
break;
@@ -2030,8 +2019,6 @@ static int grep_source_load(struct grep_source *gs)
return grep_source_load_oid(gs);
case GREP_SOURCE_BUF:
return gs->buf ? 0 : -1;
- case GREP_SOURCE_SUBMODULE:
- break;
}
die("BUG: invalid grep_source type to load");
}