]> git.proxmox.com Git - libgit2.git/blobdiff - src/submodule.h
New upstream version 1.3.0+dfsg.1
[libgit2.git] / src / submodule.h
index 57d95c3fc8dcd5a4b02ddd785e5e920c4f09d07b..b01ff68a203595d3430542d2d545b3b1ef4c401f 100644 (file)
@@ -101,12 +101,6 @@ struct git_submodule {
        git_oid wd_oid;
 };
 
-/* Force revalidation of submodule data cache (alloc as needed) */
-extern int git_submodule_cache_refresh(git_repository *repo);
-
-/* Release all submodules */
-extern void git_submodule_cache_free(git_repository *repo);
-
 /* Additional flags on top of public GIT_SUBMODULE_STATUS values */
 enum {
        GIT_SUBMODULE_STATUS__WD_SCANNED          = (1u << 20),
@@ -122,9 +116,15 @@ enum {
 #define GIT_SUBMODULE_STATUS__CLEAR_INTERNAL(S) \
        ((S) & ~(0xFFFFFFFFu << 20))
 
-/* Internal lookup does not attempt to refresh cached data */
-extern int git_submodule__lookup(
-       git_submodule **out, git_repository *repo, const char *path);
+/* Initialize an external submodule cache for the provided repo. */
+extern int git_submodule_cache_init(git_strmap **out, git_repository *repo);
+
+/* Release the resources of the submodule cache. */
+extern int git_submodule_cache_free(git_strmap *cache);
+
+/* Submodule lookup with an explicit cache */
+extern int git_submodule__lookup_with_cache(
+       git_submodule **out, git_repository *repo, const char *path, git_strmap *cache);
 
 /* Internal status fn returns status and optionally the various OIDs */
 extern int git_submodule__status(