aboutsummaryrefslogtreecommitdiff
path: root/submodule-config.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-08-31 15:38:52 -0700
committerJunio C Hamano <gitster@pobox.com>2015-08-31 15:38:52 -0700
commit5a4f07b32207044eb8380f2893f807cc8ab9d58f (patch)
tree8860227eb2821a6e7d6d490cb31a4b32a28227ff /submodule-config.h
parentfc9dfda1be25ab3bb311900c6cfbf59d6b6e224e (diff)
parent027771fcb153e0003bcb2d68e1838594a48b0161 (diff)
downloadgit-5a4f07b32207044eb8380f2893f807cc8ab9d58f.tar.gz
git-5a4f07b32207044eb8380f2893f807cc8ab9d58f.tar.xz
Merge branch 'hv/submodule-config'
The gitmodules API accessed from the C code learned to cache stuff lazily. * hv/submodule-config: submodule: allow erroneous values for the fetchRecurseSubmodules option submodule: use new config API for worktree configurations submodule: extract functions for config set and lookup submodule: implement a config API for lookup of .gitmodules values
Diffstat (limited to 'submodule-config.h')
-rw-r--r--submodule-config.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/submodule-config.h b/submodule-config.h
new file mode 100644
index 000000000..9061e4ed3
--- /dev/null
+++ b/submodule-config.h
@@ -0,0 +1,29 @@
+#ifndef SUBMODULE_CONFIG_CACHE_H
+#define SUBMODULE_CONFIG_CACHE_H
+
+#include "hashmap.h"
+#include "strbuf.h"
+
+/*
+ * Submodule entry containing the information about a certain submodule
+ * in a certain revision.
+ */
+struct submodule {
+ const char *path;
+ const char *name;
+ const char *url;
+ int fetch_recurse;
+ const char *ignore;
+ /* the sha1 blob id of the responsible .gitmodules file */
+ unsigned char gitmodules_sha1[20];
+};
+
+int parse_fetch_recurse_submodules_arg(const char *opt, const char *arg);
+int parse_submodule_config_option(const char *var, const char *value);
+const struct submodule *submodule_from_name(const unsigned char *commit_sha1,
+ const char *name);
+const struct submodule *submodule_from_path(const unsigned char *commit_sha1,
+ const char *path);
+void submodule_free(void);
+
+#endif /* SUBMODULE_CONFIG_H */