summaryrefslogtreecommitdiffstats
path: root/submodule-config.h
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2017-03-14 14:46:32 -0700
committerJunio C Hamano <gitster@pobox.com>2017-03-15 18:15:54 -0700
commitd601fd09573540287d1e00e3a25ef6311885bb46 (patch)
tree1cd1f477edaf3ce8c43be9c934a47394687d5534 /submodule-config.h
parent15cdc6477634e0227e4211de464c6443a68172c9 (diff)
downloadgit-d601fd09573540287d1e00e3a25ef6311885bb46.tar.gz
git-d601fd09573540287d1e00e3a25ef6311885bb46.tar.xz
update submodules: add submodule config parsing
Similar to b33a15b08 (push: add recurseSubmodules config option, 2015-11-17) and 027771fcb1 (submodule: allow erroneous values for the fetchRecurseSubmodules option, 2015-08-17), we add submodule-config code that is later used to parse whether we are interested in updating submodules. We need the `die_on_error` parameter to be able to call this parsing function for the config file as well, which if incorrect lets Git die. As we're just touching the header file, also mark all functions extern. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'submodule-config.h')
-rw-r--r--submodule-config.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/submodule-config.h b/submodule-config.h
index 70f19363f..d434ecdb4 100644
--- a/submodule-config.h
+++ b/submodule-config.h
@@ -22,16 +22,17 @@ struct submodule {
int recommend_shallow;
};
-int parse_fetch_recurse_submodules_arg(const char *opt, const char *arg);
-int parse_push_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_or_tree,
- const char *name);
-const struct submodule *submodule_from_path(const unsigned char *commit_or_tree,
- const char *path);
+extern int parse_fetch_recurse_submodules_arg(const char *opt, const char *arg);
+extern int parse_update_recurse_submodules_arg(const char *opt, const char *arg);
+extern int parse_push_recurse_submodules_arg(const char *opt, const char *arg);
+extern int parse_submodule_config_option(const char *var, const char *value);
+extern const struct submodule *submodule_from_name(
+ const unsigned char *commit_or_tree, const char *name);
+extern const struct submodule *submodule_from_path(
+ const unsigned char *commit_or_tree, const char *path);
extern int gitmodule_sha1_from_commit(const unsigned char *commit_sha1,
unsigned char *gitmodules_sha1,
struct strbuf *rev);
-void submodule_free(void);
+extern void submodule_free(void);
#endif /* SUBMODULE_CONFIG_H */