On Mon, May 10, 2021 at 6:11 AM Sergey Organov <sorganov@xxxxxxxxx> wrote: > > Alex Henrie <alexhenrie24@xxxxxxxxx> writes: > > > I read the following in `man git-log` today: > > > > --diff-merges=separate, --diff-merges=m, -m > > This makes merge commits show the full diff with respect to each of > > the parents. Separate log entry and diff is generated for each > > parent. -m doesn't produce any output without -p. > > > > --diff-merges=combined, --diff-merges=c, -c > > With this option, diff output for a merge commit shows the > > differences from each of the parents to the merge result > > simultaneously instead of showing pairwise diff between a parent and > > the result one at a time. Furthermore, it lists only files which > > were modified from all parents. -c implies -p. > > > > --diff-merges=dense-combined, --diff-merges=cc, --cc > > With this option the output produced by --diff-merges=combined is > > further compressed by omitting uninteresting hunks whose contents > > in the parents have only two variants and the merge result picks one > > of them without modification. --cc implies -p. > > > > Why do -c and -cc imply -p, but -m does not? I tried to use both `git > > log -c` and `git log -m` today and was confused when the latter didn't > > produce any output. Could we change this behavior in a future version > > of Git? > > Patches to fix this are almost ready, but I'd like to make a warning > that you'd likely be even more confused by the current output of "-m", > unless you set "log.diffMerges" configuration option to "first-parent". > These diffs with respect to /second/ parent at the end of the output > made me really mad once upon a time. Good observation. I'm not sure what would be the ideal default here, but certainly having -m turn on /some/ kind of diff is better than nothing. Thanks! -Alex