[PATCH v1 3/5] diff-merges: adapt -m to enable default diff format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <sorganov@xxxxxxxxx>
---
 diff-merges.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/diff-merges.c b/diff-merges.c
index 9918b6ac55e4..a02f39828336 100644
--- a/diff-merges.c
+++ b/diff-merges.c
@@ -34,10 +34,10 @@ static void set_m(struct rev_info *revs)
 {
 	/*
 	 * To "diff-index", "-m" means "match missing", and to the "log"
-	 * family of commands, it means "show full diff for merges". Set
+	 * family of commands, it means "show default diff for merges". Set
 	 * both fields appropriately.
 	 */
-	set_separate(revs);
+	set_to_default(revs);
 	revs->match_missing = 1;
 }
 
@@ -61,13 +61,13 @@ static diff_merges_setup_func_t func_by_opt(const char *optarg)
 		return suppress;
 	if (!strcmp(optarg, "1") || !strcmp(optarg, "first-parent"))
 		return set_first_parent;
-	else if (!strcmp(optarg, "m") || !strcmp(optarg, "separate"))
+	else if (!strcmp(optarg, "separate"))
 		return set_separate;
 	else if (!strcmp(optarg, "c") || !strcmp(optarg, "combined"))
 		return set_combined;
 	else if (!strcmp(optarg, "cc") || !strcmp(optarg, "dense-combined"))
 		return set_dense_combined;
-	else if (!strcmp(optarg, "default"))
+	else if (!strcmp(optarg, "m") || !strcmp(optarg, "default"))
 		return set_to_default;
 	return NULL;
 }
-- 
2.25.1




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux