"Johannes Schindelin via GitGitGadget" [off-list ref]
writes:
quoted hunk
From: Johannes Schindelin <redacted>
There are three forms, depending whether the user specifies one, two or
three non-option arguments. We've never actually explained how this
works in the manual, so let's explain it.
Signed-off-by: Johannes Schindelin <redacted>
---
Documentation/git-range-diff.txt | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/Documentation/git-range-diff.txt b/Documentation/git-range-diff.txt
index 9701c1e5fdd..76359baf26d 100644
--- a/Documentation/git-range-diff.txt
+++ b/Documentation/git-range-diff.txt
@@ -28,6 +28,19 @@ 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.
Good.
+- `<rev1>...<rev2>`. This resembles the symmetric ranges mentioned in
+ the `SPECIFYING RANGES` section of linkgit:gitrevisions[7], and is
+ equivalent to `<base>..<rev1> <base>..<rev2>` where `<base>` is the
+ merge base as obtained via `git merge-base <rev1> <rev2>`.
Does this merely resemble? Isn't it exactly what a symmetric range is?
+- `<base> <rev1> <rev2>`: This is equivalent to `<base>..<rev1>
+ <base>..<rev2>`.
Nice to see this documented.
Thanks.
Hi Junio,
On Thu, 21 Jan 2021, Junio C Hamano wrote:
"Johannes Schindelin via GitGitGadget" [off-list ref]
writes:
quoted
From: Johannes Schindelin <redacted>
There are three forms, depending whether the user specifies one, two or
three non-option arguments. We've never actually explained how this
works in the manual, so let's explain it.
Signed-off-by: Johannes Schindelin <redacted>
---
Documentation/git-range-diff.txt | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/Documentation/git-range-diff.txt b/Documentation/git-range-diff.txt
index 9701c1e5fdd..76359baf26d 100644
--- a/Documentation/git-range-diff.txt
+++ b/Documentation/git-range-diff.txt
@@ -28,6 +28,19 @@ 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.
Good.
quoted
+- `<rev1>...<rev2>`. This resembles the symmetric ranges mentioned in
+ the `SPECIFYING RANGES` section of linkgit:gitrevisions[7], and is
+ equivalent to `<base>..<rev1> <base>..<rev2>` where `<base>` is the
+ merge base as obtained via `git merge-base <rev1> <rev2>`.
Does this merely resemble? Isn't it exactly what a symmetric range is?
No, it is not exactly what a symmetric range is because `range-diff`
treats both arms of the symmetric range independently, as two distinct
non-symmetric ranges.
quoted
+- `<base> <rev1> <rev2>`: This is equivalent to `<base>..<rev1>
+ <base>..<rev2>`.
Nice to see this documented.
Yes. I was rather surprised that I had overlooked that in my original
submission of the `range-diff` command.
Ciao,
Dscho