vscode: let cSpell work on commit messages, too
[gitweb.git] / submodule-config.h
index 21273f56a37794ae5116761e85d5264acc9f81d1..dc7278eea45deedc33635af50b016e9ee28df7d2 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef SUBMODULE_CONFIG_CACHE_H
 #define SUBMODULE_CONFIG_CACHE_H
 
+#include "cache.h"
+#include "config.h"
 #include "hashmap.h"
 #include "submodule.h"
 #include "strbuf.h"
@@ -17,13 +19,13 @@ struct submodule {
        const char *ignore;
        const char *branch;
        struct submodule_update_strategy update_strategy;
-       /* the sha1 blob id of the responsible .gitmodules file */
-       unsigned char gitmodules_sha1[20];
+       /* the object id of the responsible .gitmodules file */
+       struct object_id gitmodules_oid;
        int recommend_shallow;
 };
 
 #define SUBMODULE_INIT { NULL, NULL, NULL, RECURSE_SUBMODULES_NONE, \
-       NULL, NULL, SUBMODULE_UPDATE_STRATEGY_INIT, {0}, -1 };
+       NULL, NULL, SUBMODULE_UPDATE_STRATEGY_INIT, { { 0 } }, -1 };
 
 struct submodule_cache;
 struct repository;
@@ -54,4 +56,15 @@ void submodule_free(struct repository *r);
  */
 int check_submodule_name(const char *name);
 
+/*
+ * Note: these helper functions exist solely to maintain backward
+ * compatibility with 'fetch' and 'update_clone' storing configuration in
+ * '.gitmodules'.
+ *
+ * New helpers to retrieve arbitrary configuration from the '.gitmodules' file
+ * should NOT be added.
+ */
+extern void fetch_config_from_gitmodules(int *max_children, int *recurse_submodules);
+extern void update_clone_config_from_gitmodules(int *max_jobs);
+
 #endif /* SUBMODULE_CONFIG_H */