repository: repo_submodule_init to take a submodule struct
[gitweb.git] / submodule-config.h
index ca1f94e2d2ed90f9ef4c588e27c0d8e15e1724ab..4dc9b0771c3c2c745d737ad228423e06d55e84c0 100644 (file)
@@ -2,6 +2,7 @@
 #define SUBMODULE_CONFIG_CACHE_H
 
 #include "cache.h"
+#include "config.h"
 #include "hashmap.h"
 #include "submodule.h"
 #include "strbuf.h"
@@ -47,6 +48,8 @@ const struct submodule *submodule_from_path(struct repository *r,
                                            const struct object_id *commit_or_tree,
                                            const char *path);
 void submodule_free(struct repository *r);
+int print_config_from_gitmodules(struct repository *repo, const char *key);
+int config_set_in_gitmodules_file_gently(const char *key, const char *value);
 
 /*
  * Returns 0 if the name is syntactically acceptable as a submodule "name"
@@ -55,4 +58,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 */