summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Sergey Organov <sorganov@gmail.com>2021-05-21 00:47:03 +0300
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-05-21 09:24:14 +0900
commitf5bfcc823ba242a46e20fb6f71c9fbf7ebb222fe (patch)
tree32e15a125af7d7ed46dd4300533e7702dca3170e /t
parentdiff-merges: rename "combined_imply_patch" to "merges_imply_patch" (diff)
downloadtgif-f5bfcc823ba242a46e20fb6f71c9fbf7ebb222fe.tar.xz
diff-merges: let "-m" imply "-p"
Fix long standing inconsistency between -c/--cc that do imply -p on one side, and -m that did not imply -p on the other side. Change corresponding test accordingly, as "log -m" output should now match one from "log -m -p", rather than from just "log". Change documentation accordingly. NOTES: After this patch git log -m produces diffs without need to provide -p as well, that improves both consistency and usability. It gets even more useful if one sets "log.diffMerges" configuration variable to "first-parent" to force -m produce usual diff with respect to first parent only. This patch, however, does not change behavior when specific diff format is explicitly provided on the command-line, so that commands like git log -m --raw git log -m --stat are not affected, nor does it change commands where specific diff format is active by default, such as: git diff-tree -m It's also worth to be noticed that exact historical semantics of -m is still provided by --diff-merges=separate. Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t4013-diff-various.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh
index e561a8e485..7fadc985cc 100755
--- a/t/t4013-diff-various.sh
+++ b/t/t4013-diff-various.sh
@@ -455,8 +455,8 @@ diff-tree --stat --compact-summary initial mode
diff-tree -R --stat --compact-summary initial mode
EOF
-test_expect_success 'log -m matches pure log' '
- git log master >result &&
+test_expect_success 'log -m matches log -m -p' '
+ git log -m -p master >result &&
process_diffs result >expected &&
git log -m >result &&
process_diffs result >actual &&