X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=diff.c;h=782896db55e686608aecf911e3ecb3ce129b6de5;hb=48c250a121a425a1860226b6a7061aecfbab5246;hp=9d70f9d731325287dd7e9f83e5e3b44ad1dfb8d9;hpb=e1165dd1442017c2b2722027168c497640f25746;p=git.git diff --git a/diff.c b/diff.c index 9d70f9d73..782896db5 100644 --- a/diff.c +++ b/diff.c @@ -2627,8 +2627,7 @@ static void fill_metainfo(struct strbuf *msg, (!fill_mmfile(&mf, two) && diff_filespec_is_binary(two))) abbrev = 40; } - strbuf_addf(msg, "%s%sindex %s..", set, - line_prefix, + strbuf_addf(msg, "%s%sindex %s..", line_prefix, set, find_unique_abbrev(one->sha1, abbrev)); strbuf_addstr(msg, find_unique_abbrev(two->sha1, abbrev)); if (one->mode == two->mode) @@ -2815,7 +2814,6 @@ static void run_checkdiff(struct diff_filepair *p, struct diff_options *o) void diff_setup(struct diff_options *options) { memset(options, 0, sizeof(*options)); - memset(&diff_queued_diff, 0, sizeof(diff_queued_diff)); options->file = stdout; @@ -3168,17 +3166,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"))