X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=submodule.c;h=61cb6e21ddfc789ce59597c96204e7904cd9359e;hb=452c6d506b1a6dcf24d4ceaa592afc39c1c1a60e;hp=676d48fb33119f393befcaf8998ad38741366525;hpb=dfe0171c4e78f8c392514a825c363251794fba5d;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,