diff options
Diffstat (limited to 'builtin-log.c')
-rw-r--r-- | builtin-log.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/builtin-log.c b/builtin-log.c index ab5f60c9e2..4dd6d2c449 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -329,6 +329,15 @@ static int show_tree_object(const unsigned char *sha1, static void show_rev_tweak_rev(struct rev_info *rev, struct setup_revision_opt *opt) { + if (rev->ignore_merges) { + /* There was no "-m" on the command line */ + rev->ignore_merges = 0; + if (!rev->first_parent_only && !rev->combine_merges) { + /* No "--first-parent", "-c", nor "--cc" */ + rev->combine_merges = 1; + rev->dense_combined_merges = 1; + } + } if (!rev->diffopt.output_format) rev->diffopt.output_format = DIFF_FORMAT_PATCH; } @@ -347,10 +356,7 @@ int cmd_show(int argc, const char **argv, const char *prefix) init_revisions(&rev, prefix); rev.diff = 1; - rev.combine_merges = 1; - rev.dense_combined_merges = 1; rev.always_show_header = 1; - rev.ignore_merges = 0; rev.no_walk = 1; memset(&opt, 0, sizeof(opt)); opt.def = "HEAD"; |