summaryrefslogtreecommitdiff
path: root/submodule.h
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2016-12-16 11:03:16 -0800
committerJunio C Hamano <gitster@pobox.com>2016-12-22 11:47:33 -0800
commit5688c28d81e9103a234efeedcb0568c2c4dd0bfb (patch)
tree34dbf55bef024a00b253b50a9245dfdcfaefbb51 /submodule.h
parente9a379c352b02ca560c58a56aa723994aa42666f (diff)
downloadgit-5688c28d81e9103a234efeedcb0568c2c4dd0bfb.tar.gz
submodules: add helper to determine if a submodule is populated
Add the `is_submodule_populated()` helper function to submodules.c. `is_submodule_populated()` performes a check to see if a submodule has been checkout out (and has a valid .git directory/file) at the given path. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'submodule.h')
-rw-r--r--submodule.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/submodule.h b/submodule.h
index d9e197a948..c4af505981 100644
--- a/submodule.h
+++ b/submodule.h
@@ -37,6 +37,7 @@ void set_diffopt_flags_from_submodule_config(struct diff_options *diffopt,
const char *path);
int submodule_config(const char *var, const char *value, void *cb);
void gitmodules_config(void);
+extern int is_submodule_populated(const char *path);
int parse_submodule_update_strategy(const char *value,
struct submodule_update_strategy *dst);
const char *submodule_strategy_to_string(const struct submodule_update_strategy *s);