summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-06-30 11:55:39 -0700
committerJunio C Hamano <gitster@pobox.com>2010-06-30 11:55:39 -0700
commita76b2084fb9c7e788108717fdce4c91227808980 (patch)
tree7fa7cd5019490a51bea649141c795786b9c85017 /diff.c
parent978327f97dd3bd20f1648a2fcac601191976b18c (diff)
parent46a958b3daa1da336683ec82d7f321d0f51b39c8 (diff)
downloadgit-a76b2084fb9c7e788108717fdce4c91227808980.tar.gz
Merge branch 'jl/status-ignore-submodules'
* jl/status-ignore-submodules: Add the option "--ignore-submodules" to "git status" git submodule: ignore dirty submodules for summary and status Conflicts: builtin/commit.c t/t7508-status.sh wt-status.c wt-status.h
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/diff.c b/diff.c
index 9d70f9d731..3aa695df62 100644
--- a/diff.c
+++ b/diff.c
@@ -3168,17 +3168,10 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
else if (!strcmp(arg, "--no-textconv"))
DIFF_OPT_CLR(options, ALLOW_TEXTCONV);
else if (!strcmp(arg, "--ignore-submodules"))
- DIFF_OPT_SET(options, IGNORE_SUBMODULES);
- else if (!prefixcmp(arg, "--ignore-submodules=")) {
- if (!strcmp(arg + 20, "all"))
- DIFF_OPT_SET(options, IGNORE_SUBMODULES);
- else if (!strcmp(arg + 20, "untracked"))
- DIFF_OPT_SET(options, IGNORE_UNTRACKED_IN_SUBMODULES);
- else if (!strcmp(arg + 20, "dirty"))
- DIFF_OPT_SET(options, IGNORE_DIRTY_SUBMODULES);
- else
- die("bad --ignore-submodules argument: %s", arg + 20);
- } else if (!strcmp(arg, "--submodule"))
+ handle_ignore_submodules_arg(options, "all");
+ else if (!prefixcmp(arg, "--ignore-submodules="))
+ handle_ignore_submodules_arg(options, arg + 20);
+ else if (!strcmp(arg, "--submodule"))
DIFF_OPT_SET(options, SUBMODULE_LOG);
else if (!prefixcmp(arg, "--submodule=")) {
if (!strcmp(arg + 12, "log"))