Skip to content

Commit 38fc4db

Browse files
sorganovgitster
authored andcommitted
diff-merges: adapt -m to enable default diff format
Let -m option (and --diff-merges=m) enable the default format instead of "separate", to be able to tune it with log.diffMerges option. Signed-off-by: Sergey Organov <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 26a0f58 commit 38fc4db

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

diff-merges.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ static void set_m(struct rev_info *revs)
3434
{
3535
/*
3636
* To "diff-index", "-m" means "match missing", and to the "log"
37-
* family of commands, it means "show full diff for merges". Set
37+
* family of commands, it means "show default diff for merges". Set
3838
* both fields appropriately.
3939
*/
40-
set_separate(revs);
40+
set_to_default(revs);
4141
revs->match_missing = 1;
4242
}
4343

@@ -61,13 +61,13 @@ static diff_merges_setup_func_t func_by_opt(const char *optarg)
6161
return suppress;
6262
if (!strcmp(optarg, "1") || !strcmp(optarg, "first-parent"))
6363
return set_first_parent;
64-
else if (!strcmp(optarg, "m") || !strcmp(optarg, "separate"))
64+
else if (!strcmp(optarg, "separate"))
6565
return set_separate;
6666
else if (!strcmp(optarg, "c") || !strcmp(optarg, "combined"))
6767
return set_combined;
6868
else if (!strcmp(optarg, "cc") || !strcmp(optarg, "dense-combined"))
6969
return set_dense_combined;
70-
else if (!strcmp(optarg, "on"))
70+
else if (!strcmp(optarg, "m") || !strcmp(optarg, "on"))
7171
return set_to_default;
7272
return NULL;
7373
}

0 commit comments

Comments
 (0)