diff options
author | Sergey Organov <sorganov@gmail.com> | 2020-12-21 16:19:41 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-12-21 22:47:31 +0100 |
commit | 0c627f5d3cbcb7d85219d9a4cfc195f7d4230b3d (patch) | |
tree | d1fb75cc9b338e7c9253ee66f2ba58411f092987 /diff-merges.c | |
parent | diff-merges: introduce revs->first_parent_merges flag (diff) | |
download | git-0c627f5d3cbcb7d85219d9a4cfc195f7d4230b3d.tar.xz git-0c627f5d3cbcb7d85219d9a4cfc195f7d4230b3d.zip |
diff-merges: handle imply -p on -c/--cc logic for log.c
Move logic that handles implying -p on -c/--cc from
log_setup_revisions_tweak() to diff_merges_setup_revs(), where it
belongs.
Signed-off-by: Sergey Organov <sorganov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff-merges.c')
-rw-r--r-- | diff-merges.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/diff-merges.c b/diff-merges.c index fb591a9339..c48a65f8de 100644 --- a/diff-merges.c +++ b/diff-merges.c @@ -102,4 +102,9 @@ void diff_merges_setup_revs(struct rev_info *revs) revs->ignore_merges = 1; if (revs->combined_all_paths && !revs->combine_merges) die("--combined-all-paths makes no sense without -c or --cc"); + if (revs->combine_merges) { + /* Turn --cc/-c into -p --cc/-c when -p was not given */ + if (!revs->diffopt.output_format) + revs->diffopt.output_format = DIFF_FORMAT_PATCH; + } } |