git/Documentation/git-range-diff.txt

298 lines
10 KiB
Plaintext

git-range-diff(1)
=================
NAME
----
git-range-diff - Compare two commit ranges (e.g. two versions of a branch)
SYNOPSIS
--------
[verse]
'git range-diff' [--color=[<when>]] [--no-color] [<diff-options>]
[--no-dual-color] [--creation-factor=<factor>]
[--left-only | --right-only]
( <range1> <range2> | <rev1>...<rev2> | <base> <rev1> <rev2> )
[[--] <path>...]
DESCRIPTION
-----------
This command shows the differences between two versions of a patch
series, or more generally, two commit ranges (ignoring merge commits).
In the presence of `<path>` arguments, these commit ranges are limited
accordingly.
To that end, it first finds pairs of commits from both commit ranges
that correspond with each other. Two commits are said to correspond when
the diff between their patches (i.e. the author information, the commit
message and the commit diff) is reasonably small compared to the
patches' size. See ``Algorithm`` below for details.
Finally, the list of matching commits is shown in the order of the
second commit range, with unmatched commits being inserted just after
all of their ancestors have been shown.
There are three ways to specify the commit ranges:
- `<range1> <range2>`: Either commit range can be of the form
`<base>..<rev>`, `<rev>^!` or `<rev>^-<n>`. See `SPECIFYING RANGES`
in linkgit:gitrevisions[7] for more details.
- `<rev1>...<rev2>`. This is equivalent to
`<rev2>..<rev1> <rev1>..<rev2>`.