Thread (138 messages) 138 messages, 4 authors, 2020-12-21
STALE2000d
Revisions (4)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v2 [diff vs current]
  4. v3 current

[PATCH v3 26/32] diff-merges: add old mnemonic counterparts to --diff-merges

From: Sergey Organov <hidden>
Date: 2020-12-21 18:13:38
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 diff-merges.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/diff-merges.c b/diff-merges.c
index ee91ed0db409..011bfff1f135 100644
--- a/diff-merges.c
+++ b/diff-merges.c
@@ -60,11 +60,11 @@ static void set_diff_merges(struct rev_info *revs, const char *optarg)
 
 	if (!strcmp(optarg, "first-parent"))
 		set_first_parent(revs);
-	else if (!strcmp(optarg, "separate"))
+	else if (!strcmp(optarg, "m") || !strcmp(optarg, "separate"))
 		set_separate(revs);
-	else if (!strcmp(optarg, "combined"))
+	else if (!strcmp(optarg, "c") || !strcmp(optarg, "combined"))
 		set_combined(revs);
-	else if (!strcmp(optarg, "dense-combined"))
+	else if (!strcmp(optarg, "cc") || !strcmp(optarg, "dense-combined"))
 		set_dense_combined(revs);
 	else
 		die(_("unknown value for --diff-merges: %s"), optarg);
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help