summaryrefslogtreecommitdiff
path: root/builtin/grep.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-03-28 22:35:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-03-29 16:44:50 (GMT)
commitf793b895fd752e37301702eaff948a40e7c0a4b8 (patch)
tree423cfe2800289f3f40a595500f50aabd267b1c2e /builtin/grep.c
parent6856077ab063f16b4ccacff971c3ebb185935465 (diff)
downloadgit-f793b895fd752e37301702eaff948a40e7c0a4b8.zip
git-f793b895fd752e37301702eaff948a40e7c0a4b8.tar.gz
git-f793b895fd752e37301702eaff948a40e7c0a4b8.tar.bz2
submodule-config: allow submodule_free to handle arbitrary repositories
At some point we may want to rename the function so that it describes what it actually does as 'submodule_free' doesn't quite describe that this clears a repository's submodule cache. But that's beyond the scope of this series. While at it remove the extern key word from its declaration. Signed-off-by: Stefan Beller <sbeller@google.com> Reviewed-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/grep.c')
-rw-r--r--builtin/grep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/grep.c b/builtin/grep.c
index 754eb6d..c1f22fb 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -643,7 +643,7 @@ static int grep_objects(struct grep_opt *opt, const struct pathspec *pathspec,
/* load the gitmodules file for this rev */
if (recurse_submodules) {
- submodule_free();
+ submodule_free(the_repository);
gitmodules_config_oid(&real_obj->oid);
}
if (grep_object(opt, pathspec, real_obj, list->objects[i].name,