mirror of
https://github.com/git/git.git
synced 2026-03-29 19:10:10 +02:00
Merge branch 'jl/maint-diff-ignore-submodules' into next
* jl/maint-diff-ignore-submodules: Add optional parameters to the diff option "--ignore-submodules" git diff: rename test that had a conflicting name
This commit is contained in:
11
diff.c
11
diff.c
@@ -3173,7 +3173,16 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
|
||||
DIFF_OPT_CLR(options, ALLOW_TEXTCONV);
|
||||
else if (!strcmp(arg, "--ignore-submodules"))
|
||||
DIFF_OPT_SET(options, IGNORE_SUBMODULES);
|
||||
else if (!strcmp(arg, "--submodule"))
|
||||
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"))
|
||||
DIFF_OPT_SET(options, SUBMODULE_LOG);
|
||||
else if (!prefixcmp(arg, "--submodule=")) {
|
||||
if (!strcmp(arg + 12, "log"))
|
||||
|
||||
Reference in New Issue
Block a user