Skip to content

Commit d937d09

Browse files
committed
Merge branch 'jn/log-m-does-not-imply-p' into next
Earlier "git log -m" was changed to always produce patch output, which would break existing scripts, which has been reverted. * jn/log-m-does-not-imply-p: Revert 'diff-merges: let "-m" imply "-p"'
2 parents 3572bef + 6a38e33 commit d937d09

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

Documentation/diff-options.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@ ifdef::git-log[]
4949
--diff-merges=m:::
5050
-m:::
5151
This option makes diff output for merge commits to be shown in
52-
the default format. The default format could be changed using
52+
the default format. `-m` will produce the output only if `-p`
53+
is given as well. The default format could be changed using
5354
`log.diffMerges` configuration parameter, which default value
54-
is `separate`. `-m` implies `-p`.
55+
is `separate`.
5556
+
5657
--diff-merges=first-parent:::
5758
--diff-merges=1:::
@@ -61,8 +62,7 @@ ifdef::git-log[]
6162
--diff-merges=separate:::
6263
This makes merge commits show the full diff with respect to
6364
each of the parents. Separate log entry and diff is generated
64-
for each parent. This is the format that `-m` produced
65-
historically.
65+
for each parent.
6666
+
6767
--diff-merges=combined:::
6868
--diff-merges=c:::

diff-merges.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ int diff_merges_parse_opts(struct rev_info *revs, const char **argv)
107107

108108
if (!strcmp(arg, "-m")) {
109109
set_to_default(revs);
110-
revs->merges_imply_patch = 1;
111110
} else if (!strcmp(arg, "-c")) {
112111
set_combined(revs);
113112
revs->merges_imply_patch = 1;

t/t4013-diff-various.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,8 @@ diff-tree --stat --compact-summary initial mode
455455
diff-tree -R --stat --compact-summary initial mode
456456
EOF
457457

458-
test_expect_success 'log -m matches log -m -p' '
459-
git log -m -p master >result &&
458+
test_expect_success 'log -m matches pure log' '
459+
git log master >result &&
460460
process_diffs result >expected &&
461461
git log -m >result &&
462462
process_diffs result >actual &&

0 commit comments

Comments
 (0)