diff options
author | Stefan Beller <sbeller@google.com> | 2018-03-29 01:35:28 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-29 19:44:50 +0300 |
commit | f793b895fd752e37301702eaff948a40e7c0a4b8 (patch) | |
tree | 423cfe2800289f3f40a595500f50aabd267b1c2e /submodule-config.c | |
parent | 6856077ab063f16b4ccacff971c3ebb185935465 (diff) |
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 'submodule-config.c')
-rw-r--r-- | submodule-config.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/submodule-config.c b/submodule-config.c index 2aa8a1747f..5b4f0baae8 100644 --- a/submodule-config.c +++ b/submodule-config.c @@ -642,8 +642,8 @@ const struct submodule *submodule_from_cache(struct repository *repo, key, lookup_path); } -void submodule_free(void) +void submodule_free(struct repository *r) { - if (the_repository->submodule_cache) - submodule_cache_clear(the_repository->submodule_cache); + if (r->submodule_cache) + submodule_cache_clear(r->submodule_cache); } |