diff options
author | Brandon Williams <bmwill@google.com> | 2017-08-02 12:49:21 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-02 14:26:46 -0700 |
commit | 34e2ba04be4f8e11d91b2508aa8ca84148fe63f1 (patch) | |
tree | 247d499157f99ab83d9aa15326b387c2d3f3108f /submodule.h | |
parent | 91b834807b98b620050fe534b6de93e223dbcbcf (diff) | |
download | git-34e2ba04be4f8e11d91b2508aa8ca84148fe63f1.tar.gz |
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.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/submodule.h b/submodule.h index b14660585f..8022faa591 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); |