Re: [PATCH] range-diff: optionally include merge commits' diffs in the analysis
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 8, 2024, 11:56 UTC
- Message-ID
- <xmqq5xoyndkp.fsf@gitster.g>
- In-Reply-To
- <abc2453b-f7df-4601-8834-595881f9ceca@kdbg.org>
Johannes Sixt <j6t@kdbg.org> writes:
Show 13 quoted lines
> Am 07.11.24 um 18:20 schrieb Johannes Schindelin via GitGitGadget: >> +--diff-merges=<format>:: >> + Instead of ignoring merge commits, generate diffs for them using the >> + corresponding `--diff-merges=<format>` option of linkgit:git-log[1], >> + and include them in the comparison. >> ++ >> +Note: Some of the formats supported by linkgit:git-log[1] make less sense in >> +the context of the `range-diff` command than other formats, so choose wisely! > > Can we please be a bit more specific which options are usable or which > are not usable? Perhaps you even mean to say that 'first-parent' is the > only one that makes sense? At a minimum, we should mention that it is > the one that makes most sense (if that is the case).
Good suggestion.
I am curious to see how well things like "--cc" and "--remerge-diff" fare in this use case. I suspect that in a case where the original round forgot to make necessary semantic conflict resolutions (aka "evil merge") that the new round has, all of them (including the "--first-parent") would essentially show the same change, but what is shown in such a case would be more readable with "--first-parent" by treating a merge as if it were just a single parent commit making a lot of changes, iow, merely one among other commits with equal footing.