Skip to content

Commit 5071c75

Browse files
sorganovgitster
authored andcommitted
diff-merges: add old mnemonic counterparts to --diff-merges
This adds --diff-merges={m|c|cc} values that match mnemonics of old options, for those who are used to them. Note that, say, --diff-meres=cc behaves differently than --cc, as the latter implies -p and therefore enables diffs for all the commits, while the former enables output of diffs for merge commits only. Signed-off-by: Sergey Organov <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a6d19ec commit 5071c75

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

diff-merges.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ static void set_diff_merges(struct rev_info *revs, const char *optarg)
6060

6161
if (!strcmp(optarg, "first-parent"))
6262
set_first_parent(revs);
63-
else if (!strcmp(optarg, "separate"))
63+
else if (!strcmp(optarg, "m") || !strcmp(optarg, "separate"))
6464
set_separate(revs);
65-
else if (!strcmp(optarg, "combined"))
65+
else if (!strcmp(optarg, "c") || !strcmp(optarg, "combined"))
6666
set_combined(revs);
67-
else if (!strcmp(optarg, "dense-combined"))
67+
else if (!strcmp(optarg, "cc") || !strcmp(optarg, "dense-combined"))
6868
set_dense_combined(revs);
6969
else
7070
die(_("unknown value for --diff-merges: %s"), optarg);

0 commit comments

Comments
 (0)