X-Git-Url: https://git.octo.it/?p=git.git;a=blobdiff_plain;f=diff-lib.c;h=2183b41b03d08092ba6d98a642757640b86710d6;hp=63da3b521d3bf580709ef6bf0f6e4aa83ff7d958;hb=HEAD;hpb=e09ad6e1e3308fde346b4b6287d9441363806832 diff --git a/diff-lib.c b/diff-lib.c index 63da3b52..2183b41b 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -308,12 +308,20 @@ static void mark_merge_entries(void) } } -int run_diff_index(struct rev_info *revs, int cached, int match_missing) +int run_diff_index(struct rev_info *revs, int cached) { int ret; struct object *ent; struct tree *tree; const char *tree_name; + int match_missing = 0; + + /* + * Backward compatibility wart - "diff-index -m" does + * not mean "do not ignore merges", but totally different. + */ + if (!revs->ignore_merges) + match_missing = 1; if (read_cache() < 0) { perror("read_cache");