summaryrefslogtreecommitdiff
path: root/submodule.h
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-08-02 19:49:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-08-02 21:26:46 (GMT)
commit34e2ba04be4f8e11d91b2508aa8ca84148fe63f1 (patch)
tree247d499157f99ab83d9aa15326b387c2d3f3108f /submodule.h
parent91b834807b98b620050fe534b6de93e223dbcbcf (diff)
downloadgit-34e2ba04be4f8e11d91b2508aa8ca84148fe63f1.zip
git-34e2ba04be4f8e11d91b2508aa8ca84148fe63f1.tar.gz
git-34e2ba04be4f8e11d91b2508aa8ca84148fe63f1.tar.bz2
submodule: check for unmerged .gitmodules outside of config parsing
Add 'is_gitmodules_unmerged()' function which can be used to determine in the '.gitmodules' file is unmerged based on the passed in index instead of relying on a global variable which is set during the submodule-config parsing. 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 b146605..8022faa 100644
--- a/submodule.h
+++ b/submodule.h
@@ -33,6 +33,7 @@ struct submodule_update_strategy {
};
#define SUBMODULE_UPDATE_STRATEGY_INIT {SM_UPDATE_UNSPECIFIED, NULL}
+extern int is_gitmodules_unmerged(const struct index_state *istate);
extern int is_staging_gitmodules_ok(const struct index_state *istate);
extern int update_path_in_gitmodules(const char *oldpath, const char *newpath);
extern int remove_path_from_gitmodules(const char *path);