X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=submodule.c;h=61cb6e21ddfc789ce59597c96204e7904cd9359e;hb=7e7db5e4520388d3a6f1efbe2f7a29d43bd06a2b;hp=676d48fb33119f393befcaf8998ad38741366525;hpb=035bf8d7c484b82e3e278af8c91584ae724cb5d4;p=git.git diff --git a/submodule.c b/submodule.c index 676d48fb3..61cb6e21d 100644 --- a/submodule.c +++ b/submodule.c @@ -46,6 +46,19 @@ done: return ret; } +void handle_ignore_submodules_arg(struct diff_options *diffopt, + const char *arg) +{ + if (!strcmp(arg, "all")) + DIFF_OPT_SET(diffopt, IGNORE_SUBMODULES); + 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); + else + die("bad --ignore-submodules argument: %s", arg); +} + void show_submodule_summary(FILE *f, const char *path, unsigned char one[20], unsigned char two[20], unsigned dirty_submodule,