diff options
Diffstat (limited to 'submodule.c')
-rw-r--r-- | submodule.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/submodule.c b/submodule.c index 7d8b000ab4..c28a926daf 100644 --- a/submodule.c +++ b/submodule.c @@ -304,6 +304,16 @@ int parse_submodule_config_option(const char *var, const char *value) return 0; } +void enforce_no_complete_ignore_submodule(struct diff_options *diffopt) +{ + DIFF_OPT_SET(diffopt, NO_IGNORE_SUBMODULE); + if (DIFF_OPT_TST(diffopt, OVERRIDE_SUBMODULE_CONFIG) && + DIFF_OPT_TST(diffopt, IGNORE_SUBMODULES)) { + DIFF_OPT_CLR(diffopt, IGNORE_SUBMODULES); + DIFF_OPT_SET(diffopt, IGNORE_DIRTY_SUBMODULES); + } +} + void handle_ignore_submodules_arg(struct diff_options *diffopt, const char *arg) { @@ -311,9 +321,11 @@ void handle_ignore_submodules_arg(struct diff_options *diffopt, DIFF_OPT_CLR(diffopt, IGNORE_UNTRACKED_IN_SUBMODULES); DIFF_OPT_CLR(diffopt, IGNORE_DIRTY_SUBMODULES); - if (!strcmp(arg, "all")) + if (!strcmp(arg, "all")) { + if (DIFF_OPT_TST(diffopt, NO_IGNORE_SUBMODULE)) + return; DIFF_OPT_SET(diffopt, IGNORE_SUBMODULES); - else if (!strcmp(arg, "untracked")) + } else if (!strcmp(arg, "untracked")) DIFF_OPT_SET(diffopt, IGNORE_UNTRACKED_IN_SUBMODULES); else if (!strcmp(arg, "dirty")) DIFF_OPT_SET(diffopt, IGNORE_DIRTY_SUBMODULES); |