summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin/log.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin/log.c b/builtin/log.c
index 8651105..e37c27a 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -633,6 +633,10 @@ static void log_setup_revisions_tweak(struct rev_info *rev,
if (DIFF_OPT_TST(&rev->diffopt, DEFAULT_FOLLOW_RENAMES) &&
rev->prune_data.nr == 1)
DIFF_OPT_SET(&rev->diffopt, FOLLOW_RENAMES);
+
+ /* Turn --cc/-c into -p --cc/-c when -p was not given */
+ if (!rev->diffopt.output_format && rev->combine_merges)
+ rev->diffopt.output_format = DIFF_FORMAT_PATCH;
}
int cmd_log(int argc, const char **argv, const char *prefix)