Functions
---------
-`void submodule_free()`::
+`void submodule_free(struct repository *r)`::
Use these to free the internally cached values.
/* 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,
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);
}
extern const struct submodule *submodule_from_cache(struct repository *repo,
const struct object_id *treeish_name,
const char *key);
-extern void submodule_free(void);
+void submodule_free(struct repository *r);
#endif /* SUBMODULE_CONFIG_H */
arg += 2;
}
- submodule_free();
+ submodule_free(the_repository);
return 0;
}
if (!state && ce->ce_flags & CE_WT_REMOVE) {
repo_read_gitmodules(the_repository);
} else if (state && (ce->ce_flags & CE_UPDATE)) {
- submodule_free();
+ submodule_free(the_repository);
checkout_entry(ce, state, NULL);
repo_read_gitmodules(the_repository);
}