Skip to content

Commit f99416a

Browse files
committed
range-diff: introduce the convenience option --remerge-diff
Just like `git log`, now also `git range-diff` has that option as a shortcut for the common operation that would otherwise require the quite unwieldy (if theoretically "more correct") `--diff-mode=remerge` option. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent ef3c243 commit f99416a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Documentation/git-range-diff.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ SYNOPSIS
1111
'git range-diff' [--color=[<when>]] [--no-color] [<diff-options>]
1212
[--no-dual-color] [--creation-factor=<factor>]
1313
[--left-only | --right-only] [--diff-merges=<format>]
14+
[--remerge-diff]
1415
( <range1> <range2> | <rev1>...<rev2> | <base> <rev1> <rev2> )
1516
[[--] <path>...]
1617

@@ -92,6 +93,9 @@ have produced. In other words, if a merge commit is the result of a
9293
non-conflicting `git merge`, the `remerge` mode will represent it with an empty
9394
diff.
9495

96+
--remerge-diff::
97+
Convenience option, equivalent to `--diff-merges=remerge`.
98+
9599
--[no-]notes[=<ref>]::
96100
This flag is passed to the `git log` program
97101
(see linkgit:git-log[1]) that generates the patches.

builtin/range-diff.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ int cmd_range_diff(int argc, const char **argv, const char *prefix)
3434
PARSE_OPT_OPTARG),
3535
OPT_PASSTHRU_ARGV(0, "diff-merges", &diff_merges_arg,
3636
N_("style"), N_("passed to 'git log'"), 0),
37+
OPT_PASSTHRU_ARGV(0, "remerge-diff", &diff_merges_arg, NULL,
38+
N_("passed to 'git log'"), PARSE_OPT_NOARG),
3739
OPT_BOOL(0, "left-only", &left_only,
3840
N_("only emit output related to the first range")),
3941
OPT_BOOL(0, "right-only", &right_only,

0 commit comments

Comments
 (0)