Browse Source

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 <sorganov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Sergey Organov 4 years ago committed by Junio C Hamano
parent
commit
38fc4dbbc2
  1. 8
      diff-merges.c

8
diff-merges.c

@ -34,10 +34,10 @@ static void set_m(struct rev_info *revs) @@ -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) @@ -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, "on"))
else if (!strcmp(optarg, "m") || !strcmp(optarg, "on"))
return set_to_default;
return NULL;
}

Loading…
Cancel
Save