diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2024-12-16 15:11:21 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-12-16 17:45:48 +0100 |
commit | f8043236c6c9cb9e943a87ab2e55e8e394796727 (patch) | |
tree | 467a7cd8324222ae4db001d4d6acadd5a9e5ab58 /range-diff.h | |
parent | Merge branch 'js/log-remerge-keep-ancestry' into js/range-diff-diff-merges (diff) | |
download | git-f8043236c6c9cb9e943a87ab2e55e8e394796727.tar.xz git-f8043236c6c9cb9e943a87ab2e55e8e394796727.zip |
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>
Diffstat (limited to 'range-diff.h')
-rw-r--r-- | range-diff.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/range-diff.h b/range-diff.h index 2f69f6a434..cd85000b5a 100644 --- a/range-diff.h +++ b/range-diff.h @@ -16,6 +16,7 @@ struct range_diff_options { int creation_factor; unsigned dual_color:1; unsigned left_only:1, right_only:1; + unsigned include_merges:1; const struct diff_options *diffopt; /* may be NULL */ const struct strvec *other_arg; /* may be NULL */ }; |