]> git.ipfire.org Git - thirdparty/git.git/commit
range-diff: optionally include merge commits' diffs in the analysis
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Mon, 16 Dec 2024 14:11:21 +0000 (14:11 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Dec 2024 16:45:48 +0000 (08:45 -0800)
commitf8043236c6c9cb9e943a87ab2e55e8e394796727
tree467a7cd8324222ae4db001d4d6acadd5a9e5ab58
parenteb8374c652e56ee18702a8d0b06dd6bf6d07eff7
range-diff: optionally include merge commits' diffs in the analysis

The `git log` command already offers support for including diffs for
merges, via the `--diff-merges=<format>` option.

Let's add corresponding support for `git range-diff`, too. This makes it
more convenient to spot differences between commit ranges that contain
merges.

This is especially true in scenarios with non-trivial merges, i.e.
merges introducing changes other than, or in addition to, what merge ORT
would have produced. Merging a topic branch that changes a function
signature into a branch that added a caller of that function, for
example, would require the merge commit itself to adjust that caller to
the modified signature.

In my code reviews, I found the `--diff-merges=remerge` option
particularly useful.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-range-diff.txt
builtin/range-diff.c
range-diff.c
range-diff.h
t/t3206-range-diff.sh