diff options
author | Sergey Organov <sorganov@gmail.com> | 2020-12-21 18:19:32 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-12-22 00:47:30 +0300 |
commit | 3d4fd9436337d1688e7e2c2b2da4f7b7e3e8591e (patch) | |
tree | 77e732ff66e52a74abf2cc59b0cd90ba9ccccc46 /builtin | |
parent | 027c4783d73bbaff0a3c494b886cd8fa20ba8372 (diff) |
revision: provide implementation for diff merges tweaks
Use these implementations from show_setup_revisions_tweak() and
log_setup_revisions_tweak() in builtin/log.c.
This completes moving of management of diff merges parameters to a
single place, where we can finally observe them simultaneously.
Signed-off-by: Sergey Organov <sorganov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/log.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/builtin/log.c b/builtin/log.c index 0a7ed4bef9..717855a49e 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -598,15 +598,7 @@ static int show_tree_object(const struct object_id *oid, static void show_setup_revisions_tweak(struct rev_info *rev, struct setup_revision_opt *opt) { - if (rev->ignore_merges < 0) { - /* There was no "-m" variant on the command line */ - rev->ignore_merges = 0; - if (!rev->first_parent_only && !rev->combine_merges) { - /* No "--first-parent", "-c", or "--cc" */ - rev->combine_merges = 1; - rev->dense_combined_merges = 1; - } - } + rev_diff_merges_default_to_dense_combined(rev); if (!rev->diffopt.output_format) rev->diffopt.output_format = DIFF_FORMAT_PATCH; } @@ -731,8 +723,7 @@ static void log_setup_revisions_tweak(struct rev_info *rev, if (!rev->diffopt.output_format && rev->combine_merges) rev->diffopt.output_format = DIFF_FORMAT_PATCH; - if (rev->first_parent_only && rev->ignore_merges < 0) - rev->ignore_merges = 0; + rev_diff_merges_first_parent_defaults_to_enable(rev); } int cmd_log(int argc, const char **argv, const char *prefix) |