diff options
Diffstat (limited to 'repository.c')
-rw-r--r-- | repository.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/repository.c b/repository.c index 6f6f4d91e..358c17517 100644 --- a/repository.c +++ b/repository.c @@ -1,6 +1,7 @@ #include "cache.h" #include "repository.h" #include "config.h" +#include "submodule-config.h" /* The main repository */ static struct repository the_repo; @@ -164,6 +165,11 @@ void repo_clear(struct repository *repo) repo->config = NULL; } + if (repo->submodule_cache) { + submodule_cache_free(repo->submodule_cache); + repo->submodule_cache = NULL; + } + if (repo->index) { discard_index(repo->index); free(repo->index); |