threads / bug / 62518

rev-list --ancestry-path with arg - bug or undocumented requirement

Subject: rev-list --ancestry-path with arg - bug or undocumented requirement

## tl;dr

12 messages between Nov 19, 2024 and Dec 3, 2024.

replies: 11people: 4as markdown or json

Kai Koponen· Nov 19, 2024, 21:53 UTC · lore
What did you do before the bug happened? (Steps to reproduce your issue)
Create a toy repo with commits in the following structure:
A - B - C
     \
      D
Run `git rev-list --ancestry-path=D A..C`.

What did you expect to happen? (Expected behavior) Commits A and B should be listed.

What happened instead? (Actual behavior) No commits listed.

What's different between what you expected and what actually happened? --ancestry-path with a commit arg seems to return 0 results unless the specified commit is itself part of the range. The rev-list documentation does not mention that this is a requirement.

[System Info]
git version:
git version 2.47.0.338.g60cca15819-goog
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
libcurl: 8.8.0
OpenSSL: OpenSSL 3.3.2 3 Sep 2024
zlib: 1.3
compiler info: gnuc: 13.2
libc info: glibc: 2.38
$SHELL (typically, interactive shell): /bin/bash

[Enabled Hooks] commit-msg pre-commit prepare-commit-msg

Elijah Newren· Nov 20, 2024, 03:22 UTC · re: Kai Koponen · lore

Re: rev-list --ancestry-path with arg - bug or undocumented requirement

On Tue, Nov 19, 2024 at 1:53 PM Kai Koponen <kaikoponen@google.com> wrote:
Show 19 quoted lines
>
> What did you do before the bug happened? (Steps to reproduce your issue)
> Create a toy repo with commits in the following structure:
> A - B - C
>      \
>       D
>
> Run `git rev-list --ancestry-path=D A..C`.
>
> What did you expect to happen? (Expected behavior)
> Commits A and B should be listed.
>
> What happened instead? (Actual behavior)
> No commits listed.
>
> What's different between what you expected and what actually happened?
> --ancestry-path with a commit arg seems to return 0 results unless the
> specified commit is itself part of the range. The rev-list documentation
> does not mention that this is a requirement.

Yeah, the commit message that introduced --ancestry-path=COMMIT did document this in its commit message (see 257418c59040c13bfa839e01922e21833cda6a52257418c59040 (revision: allow --ancestry-path to take an argument, 2022-08-19)), and I think my original documentation patch was a little clearer on this point, but when Jonathan suggested an alternative for the documentation (https://lore.kernel.org/git/20220818222416.3567602-1-jonathantanmy@google.com/), I didn't think about someone attempting a commit outside the ancestry-path as the argument. My bad.

Based on the references above, would you like to suggest a documentation patch to ensure this requirement is documented?

Kai Koponen· Dec 2, 2024, 19:45 UTC · re: Elijah Newren · lore

Re: rev-list --ancestry-path with arg - bug or undocumented requirement

From 447a2367f8d3318e69adccc1b011b0d04792e438 Mon Sep 17 00:00:00 2001
From: Kai Koponen <kaikoponen@google.com>
Date: Mon, 2 Dec 2024 19:32:25 +0000
Subject: [PATCH] doc: mention rev-list --ancestry-path restrictions
Signed-off-by: Kai Koponen <kaikopone@google.com>
---
 Documentation/rev-list-options.txt | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/Documentation/rev-list-options.txt
b/Documentation/rev-list-options.txt
index 00ccf68744..1c678294af 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -412,12 +412,13 @@ Default mode::

 --ancestry-path[=<commit>]::
  When given a range of commits to display (e.g. 'commit1..commit2'
- or 'commit2 {caret}commit1'), only display commits in that range
- that are ancestors of <commit>, descendants of <commit>, or
- <commit> itself.  If no commit is specified, use 'commit1' (the
- excluded part of the range) as <commit>.  Can be passed multiple
- times; if so, a commit is included if it is any of the commits
- given or if it is an ancestor or descendant of one of them.
+ or 'commit2 {caret}commit1'), and a commit <commit> in that range,
+ only display commits in that range that are ancestors of <commit>,
+ descendants of <commit>, or <commit> itself. If no commit is
+ specified, use 'commit1' (the excluded part of the range) as
+ <commit>.  Can be passed multiple times; if so, a commit is
+ included if it is any of the commits given or if it is an ancestor
+ or descendant of one of them.

 A more detailed explanation follows.
-- 
2.47.0.338.g60cca15819-goog

On Tue, Nov 19, 2024 at 10:22 PM Elijah Newren <newren@gmail.com> wrote:
>
> On Tue, Nov 19, 2024 at 1:53 PM Kai Koponen <kaikoponen@google.com> wrote:
> >
> > What did you do before the bug happened? (Steps to reproduce your issue)
> > Create a toy repo with commits in the following structure:
> > A - B - C
> >      \
> >       D
> >
> > Run `git rev-list --ancestry-path=D A..C`.
> >
> > What did you expect to happen? (Expected behavior)
> > Commits A and B should be listed.
> >
> > What happened instead? (Actual behavior)
> > No commits listed.
> >
> > What's different between what you expected and what actually happened?
> > --ancestry-path with a commit arg seems to return 0 results unless the
> > specified commit is itself part of the range. The rev-list documentation
> > does not mention that this is a requirement.
>
> Yeah, the commit message that introduced --ancestry-path=COMMIT did
> document this in its commit message (see
> 257418c59040c13bfa839e01922e21833cda6a52257418c59040 (revision: allow
> --ancestry-path to take an argument, 2022-08-19)), and I think my
> original documentation patch was a little clearer on this point, but
> when Jonathan suggested an alternative for the documentation
> (https://lore.kernel.org/git/20220818222416.3567602-1-jonathantanmy@google.com/),
> I didn't think about someone attempting a commit outside the
> ancestry-path as the argument.  My bad.
>
> Based on the references above, would you like to suggest a
> documentation patch to ensure this requirement is documented?
Elijah Newren· Dec 2, 2024, 23:48 UTC · re: Kai Koponen · lore

Re: rev-list --ancestry-path with arg - bug or undocumented requirement

On Mon, Dec 2, 2024 at 11:45 AM Kai Koponen <kaikoponen@google.com> wrote:
Show 33 quoted lines
>
> From 447a2367f8d3318e69adccc1b011b0d04792e438 Mon Sep 17 00:00:00 2001
> From: Kai Koponen <kaikoponen@google.com>
> Date: Mon, 2 Dec 2024 19:32:25 +0000
> Subject: [PATCH] doc: mention rev-list --ancestry-path restrictions
>
> Signed-off-by: Kai Koponen <kaikopone@google.com>
> ---
>  Documentation/rev-list-options.txt | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/Documentation/rev-list-options.txt
> b/Documentation/rev-list-options.txt
> index 00ccf68744..1c678294af 100644
> --- a/Documentation/rev-list-options.txt
> +++ b/Documentation/rev-list-options.txt
> @@ -412,12 +412,13 @@ Default mode::
>
>  --ancestry-path[=<commit>]::
>   When given a range of commits to display (e.g. 'commit1..commit2'
> - or 'commit2 {caret}commit1'), only display commits in that range
> - that are ancestors of <commit>, descendants of <commit>, or
> - <commit> itself.  If no commit is specified, use 'commit1' (the
> - excluded part of the range) as <commit>.  Can be passed multiple
> - times; if so, a commit is included if it is any of the commits
> - given or if it is an ancestor or descendant of one of them.
> + or 'commit2 {caret}commit1'), and a commit <commit> in that range,
> + only display commits in that range that are ancestors of <commit>,
> + descendants of <commit>, or <commit> itself. If no commit is
> + specified, use 'commit1' (the excluded part of the range) as
> + <commit>.  Can be passed multiple times; if so, a commit is
> + included if it is any of the commits given or if it is an ancestor
> + or descendant of one of them.

where the changes are the insertion of the phrase "and a commit <commit> in that range,", which nicely captures the restriction.

This patch looks good to me, thanks.
Show 5 quoted lines
>
>  A more detailed explanation follows.
>
> --
> 2.47.0.338.g60cca15819-goog
Junio C Hamano· Dec 3, 2024, 01:05 UTC · re: Kai Koponen · lore

Re: rev-list --ancestry-path with arg - bug or undocumented requirement

Kai Koponen <kaikoponen@google.com> writes:
> From 447a2367f8d3318e69adccc1b011b0d04792e438 Mon Sep 17 00:00:00 2001
Do not include this line.

It is not a part of message, but merely added as a mark that a new message starts here in case there are two or more patch e-mail messages in a file. Since you are sending one patch per one e-mail message, you do not want it.

> From: Kai Koponen <kaikoponen@google.com>

Let your MUA have it on the From: header of your message; you do not want this line when your MUA is configured correctly (and yours is; we see From: header saying the same thing).

> Date: Mon, 2 Dec 2024 19:32:25 +0000

You do not want this, either. Your MUA records on Date: header the time general public saw this change for the first time.

> Subject: [PATCH] doc: mention rev-list --ancestry-path restrictions

Put this in the e-mail header. We add [PATCH] for a very good reason: make it easier to find patches in the mailing list traffic.

>

Here is where you "sell" your changes by explaining why we are making this change (like "existing text allows misinterpretation that makes it sound like doing this and that are possible, which is not true"). Please do not leave it empty.

Show 27 quoted lines
> Signed-off-by: Kai Koponen <kaikopone@google.com>
> ---
>  Documentation/rev-list-options.txt | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/Documentation/rev-list-options.txt
> b/Documentation/rev-list-options.txt
> index 00ccf68744..1c678294af 100644
> --- a/Documentation/rev-list-options.txt
> +++ b/Documentation/rev-list-options.txt
> @@ -412,12 +412,13 @@ Default mode::
>
>  --ancestry-path[=<commit>]::
>   When given a range of commits to display (e.g. 'commit1..commit2'
> - or 'commit2 {caret}commit1'), only display commits in that range
> - that are ancestors of <commit>, descendants of <commit>, or
> - <commit> itself.  If no commit is specified, use 'commit1' (the
> - excluded part of the range) as <commit>.  Can be passed multiple
> - times; if so, a commit is included if it is any of the commits
> - given or if it is an ancestor or descendant of one of them.
> + or 'commit2 {caret}commit1'), and a commit <commit> in that range,
> + only display commits in that range that are ancestors of <commit>,
> + descendants of <commit>, or <commit> itself. If no commit is
> + specified, use 'commit1' (the excluded part of the range) as
> + <commit>.  Can be passed multiple times; if so, a commit is
> + included if it is any of the commits given or if it is an ancestor
> + or descendant of one of them.

As these files in Documentation/ are input to formatting programs, please do not reflow the text unnecessarily so that what you changed stand out, instead of forcing reviewers to go word-by-word to sift through the changes to see what got really changed.

Thanks.
Kai Koponen· Dec 3, 2024, 17:14 UTC · re: Junio C Hamano · lore

[PATCH] doc: mention rev-list --ancestry-path restrictions

The rev-list documentation doesn't mention that the given commit must be in the specified commit range, leading to unexpected results.

Signed-off-by: Kai Koponen <kaikopone@google.com>
---
 Documentation/rev-list-options.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/rev-list-options.txt
b/Documentation/rev-list-options.txt
index 00ccf68744..f0a46f9da5 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -412,7 +412,7 @@ Default mode::

 --ancestry-path[=<commit>]::
  When given a range of commits to display (e.g. 'commit1..commit2'
- or 'commit2 {caret}commit1'), only display commits in that range
+ or 'commit2 {caret}commit1'), and a commit <commit> in that range,
only display commits in that range
  that are ancestors of <commit>, descendants of <commit>, or
  <commit> itself.  If no commit is specified, use 'commit1' (the
  excluded part of the range) as <commit>.  Can be passed multiple
-- 
2.47.0.338.g60cca15819-goog

On Mon, Dec 2, 2024 at 8:05 PM Junio C Hamano <gitster@pobox.com> wrote:
>
> Kai Koponen <kaikoponen@google.com> writes:
>
> > From 447a2367f8d3318e69adccc1b011b0d04792e438 Mon Sep 17 00:00:00 2001
>
> Do not include this line.
>
> It is not a part of message, but merely added as a mark that a new
> message starts here in case there are two or more patch e-mail
> messages in a file.  Since you are sending one patch per one e-mail
> message, you do not want it.
>
> > From: Kai Koponen <kaikoponen@google.com>
>
> Let your MUA have it on the From: header of your message; you do not
> want this line when your MUA is configured correctly (and yours is;
> we see From: header saying the same thing).
>
> > Date: Mon, 2 Dec 2024 19:32:25 +0000
>
> You do not want this, either.  Your MUA records on Date: header the
> time general public saw this change for the first time.
>
> > Subject: [PATCH] doc: mention rev-list --ancestry-path restrictions
>
> Put this in the e-mail header.  We add [PATCH] for a very good reason:
> make it easier to find patches in the mailing list traffic.
>
> >
>
> Here is where you "sell" your changes by explaining why we are
> making this change (like "existing text allows misinterpretation
> that makes it sound like doing this and that are possible, which is
> not true").  Please do not leave it empty.
>
> > Signed-off-by: Kai Koponen <kaikopone@google.com>
> > ---
> >  Documentation/rev-list-options.txt | 13 +++++++------
> >  1 file changed, 7 insertions(+), 6 deletions(-)
> >
> > diff --git a/Documentation/rev-list-options.txt
> > b/Documentation/rev-list-options.txt
> > index 00ccf68744..1c678294af 100644
> > --- a/Documentation/rev-list-options.txt
> > +++ b/Documentation/rev-list-options.txt
> > @@ -412,12 +412,13 @@ Default mode::
> >
> >  --ancestry-path[=<commit>]::
> >   When given a range of commits to display (e.g. 'commit1..commit2'
> > - or 'commit2 {caret}commit1'), only display commits in that range
> > - that are ancestors of <commit>, descendants of <commit>, or
> > - <commit> itself.  If no commit is specified, use 'commit1' (the
> > - excluded part of the range) as <commit>.  Can be passed multiple
> > - times; if so, a commit is included if it is any of the commits
> > - given or if it is an ancestor or descendant of one of them.
> > + or 'commit2 {caret}commit1'), and a commit <commit> in that range,
> > + only display commits in that range that are ancestors of <commit>,
> > + descendants of <commit>, or <commit> itself. If no commit is
> > + specified, use 'commit1' (the excluded part of the range) as
> > + <commit>.  Can be passed multiple times; if so, a commit is
> > + included if it is any of the commits given or if it is an ancestor
> > + or descendant of one of them.
>
> As these files in Documentation/ are input to formatting programs,
> please do not reflow the text unnecessarily so that what you changed
> stand out, instead of forcing reviewers to go word-by-word to sift
> through the changes to see what got really changed.
>
> Thanks.
Kristoffer Haugsbakk· Dec 3, 2024, 17:38 UTC · re: Kai Koponen · lore

Re: [PATCH] doc: mention rev-list --ancestry-path restrictions

Hello Kai
On Tue, Dec 3, 2024, at 18:14, Kai Koponen wrote:
Show 8 quoted lines
> The rev-list documentation doesn't mention that the given
> commit must be in the specified commit range, leading
> to unexpected results.
>
> Signed-off-by: Kai Koponen <kaikopone@google.com>
> ---
>  Documentation/rev-list-options.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

I couldn’t apply this patch to `master` (cc01bad4a9f (The twelfth batch, 2024-11-27)). It looks like it is because..

Show 13 quoted lines
>
> diff --git a/Documentation/rev-list-options.txt
> b/Documentation/rev-list-options.txt
> index 00ccf68744..f0a46f9da5 100644
> --- a/Documentation/rev-list-options.txt
> +++ b/Documentation/rev-list-options.txt
> @@ -412,7 +412,7 @@ Default mode::
>
>  --ancestry-path[=<commit>]::
>   When given a range of commits to display (e.g. 'commit1..commit2'
> - or 'commit2 {caret}commit1'), only display commits in that range
> + or 'commit2 {caret}commit1'), and a commit <commit> in that range,
> only display commits in that range
This line got corrupted (linebreak).

I see that you used git-send-email(1). Did you edit the patch file manually in order to add the quotation from Junio below? I’m guessing the editor then broke that line since it is 102 characters when combined/joined. I guess you could use cat(1) instead. I like to use Git Notes. You can add a note to the commit and then use that default namespace (commits) when making the patch.

    git notes edit
    git format-patch --notes=commits ...

Although in this case it might be better to add a linebreak since the line gets so long. You can add one short line so that you don’t get the reflow-paragraph problem from the previous version:

(these are with space indentation instead of tabs)
     --ancestry-path[=<commit>]::
            When given a range of commits to display (e.g. 'commit1..commit2'
    -       or 'commit2 {caret}commit1'), only display commits in that range
    +       or 'commit2 {caret}commit1'), only display commits in that range,
    +       and a commit <commit> in that range,
            that are ancestors of <commit>, descendants of <commit>, or
            <commit> itself.  If no commit is specified, use 'commit1' (the
            excluded part of the range) as <commit>.  Can be passed multiple
Kai Koponen· Dec 3, 2024, 17:59 UTC · re: Kristoffer Haugsbakk · lore

Re: [PATCH] doc: mention rev-list --ancestry-path restrictions

Apologies, I made a mistake while copying the patch in manually from format-patch; my git install doesn't have send-email available, I'll fix that.

On Tue, Dec 3, 2024 at 12:39 PM Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com> wrote:

Show 56 quoted lines
>
> Hello Kai
>
> On Tue, Dec 3, 2024, at 18:14, Kai Koponen wrote:
> > The rev-list documentation doesn't mention that the given
> > commit must be in the specified commit range, leading
> > to unexpected results.
> >
> > Signed-off-by: Kai Koponen <kaikopone@google.com>
> > ---
> >  Documentation/rev-list-options.txt | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
>
> I couldn’t apply this patch to `master` (cc01bad4a9f (The twelfth batch,
> 2024-11-27)). It looks like it is because..
>
> >
> > diff --git a/Documentation/rev-list-options.txt
> > b/Documentation/rev-list-options.txt
> > index 00ccf68744..f0a46f9da5 100644
> > --- a/Documentation/rev-list-options.txt
> > +++ b/Documentation/rev-list-options.txt
> > @@ -412,7 +412,7 @@ Default mode::
> >
> >  --ancestry-path[=<commit>]::
> >   When given a range of commits to display (e.g. 'commit1..commit2'
> > - or 'commit2 {caret}commit1'), only display commits in that range
> > + or 'commit2 {caret}commit1'), and a commit <commit> in that range,
> > only display commits in that range
>
> This line got corrupted (linebreak).
>
> I see that you used git-send-email(1).  Did you edit the patch file
> manually in order to add the quotation from Junio below? I’m guessing
> the editor then broke that line since it is 102 characters when
> combined/joined.  I guess you could use cat(1) instead.  I like to use
> Git Notes.  You can add a note to the commit and then use that default
> namespace (commits) when making the patch.
>
>     git notes edit
>     git format-patch --notes=commits ...
>
> Although in this case it might be better to add a linebreak since the
> line gets so long. You can add one short line so that you don’t get the
> reflow-paragraph problem from the previous version:
>
> (these are with space indentation instead of tabs)
>
>      --ancestry-path[=<commit>]::
>             When given a range of commits to display (e.g. 'commit1..commit2'
>     -       or 'commit2 {caret}commit1'), only display commits in that range
>     +       or 'commit2 {caret}commit1'), only display commits in that range,
>     +       and a commit <commit> in that range,
>             that are ancestors of <commit>, descendants of <commit>, or
>             <commit> itself.  If no commit is specified, use 'commit1' (the
>             excluded part of the range) as <commit>.  Can be passed multiple
Kai Koponen· Dec 3, 2024, 20:21 UTC · re: Kai Koponen · lore

Re: [PATCH] doc: mention rev-list --ancestry-path restrictions

Re-trying via GitGitGadget at https://lore.kernel.org/git/pull.1838.git.git.1733257083739.gitgitgadget@gmail.com/

On Tue, Dec 3, 2024 at 12:59 PM Kai Koponen <kaikoponen@google.com> wrote:
Show 63 quoted lines
>
> Apologies, I made a mistake while copying the patch in manually from
> format-patch; my git install doesn't have send-email available, I'll
> fix that.
>
> On Tue, Dec 3, 2024 at 12:39 PM Kristoffer Haugsbakk
> <kristofferhaugsbakk@fastmail.com> wrote:
> >
> > Hello Kai
> >
> > On Tue, Dec 3, 2024, at 18:14, Kai Koponen wrote:
> > > The rev-list documentation doesn't mention that the given
> > > commit must be in the specified commit range, leading
> > > to unexpected results.
> > >
> > > Signed-off-by: Kai Koponen <kaikopone@google.com>
> > > ---
> > >  Documentation/rev-list-options.txt | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > I couldn’t apply this patch to `master` (cc01bad4a9f (The twelfth batch,
> > 2024-11-27)). It looks like it is because..
> >
> > >
> > > diff --git a/Documentation/rev-list-options.txt
> > > b/Documentation/rev-list-options.txt
> > > index 00ccf68744..f0a46f9da5 100644
> > > --- a/Documentation/rev-list-options.txt
> > > +++ b/Documentation/rev-list-options.txt
> > > @@ -412,7 +412,7 @@ Default mode::
> > >
> > >  --ancestry-path[=<commit>]::
> > >   When given a range of commits to display (e.g. 'commit1..commit2'
> > > - or 'commit2 {caret}commit1'), only display commits in that range
> > > + or 'commit2 {caret}commit1'), and a commit <commit> in that range,
> > > only display commits in that range
> >
> > This line got corrupted (linebreak).
> >
> > I see that you used git-send-email(1).  Did you edit the patch file
> > manually in order to add the quotation from Junio below? I’m guessing
> > the editor then broke that line since it is 102 characters when
> > combined/joined.  I guess you could use cat(1) instead.  I like to use
> > Git Notes.  You can add a note to the commit and then use that default
> > namespace (commits) when making the patch.
> >
> >     git notes edit
> >     git format-patch --notes=commits ...
> >
> > Although in this case it might be better to add a linebreak since the
> > line gets so long. You can add one short line so that you don’t get the
> > reflow-paragraph problem from the previous version:
> >
> > (these are with space indentation instead of tabs)
> >
> >      --ancestry-path[=<commit>]::
> >             When given a range of commits to display (e.g. 'commit1..commit2'
> >     -       or 'commit2 {caret}commit1'), only display commits in that range
> >     +       or 'commit2 {caret}commit1'), only display commits in that range,
> >     +       and a commit <commit> in that range,
> >             that are ancestors of <commit>, descendants of <commit>, or
> >             <commit> itself.  If no commit is specified, use 'commit1' (the
> >             excluded part of the range) as <commit>.  Can be passed multiple
Junio C Hamano· Dec 3, 2024, 23:33 UTC · re: Kristoffer Haugsbakk · lore

Re: [PATCH] doc: mention rev-list --ancestry-path restrictions

"Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com> writes:
> Hello Kai
>
> I couldn’t apply this patch to `master` (cc01bad4a9f (The twelfth batch,
> 2024-11-27)). It looks like it is because..

yes it is heavily whitespace damaged. Here is what I applied after manually reconstructing.

--- >8 ---
From: Kai Koponen <kaikoponen@google.com>
Date: Tue, 3 Dec 2024 12:14:34 -0500
Subject: [PATCH] doc: mention rev-list --ancestry-path restrictions

The rev-list documentation doesn't mention that the given commit must be in the specified commit range, leading to unexpected results.

Signed-off-by: Kai Koponen <kaikopone@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Documentation/rev-list-options.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index 0d90d5b154..9d5243e0aa 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -401,7 +401,8 @@ Default mode::
 
 --ancestry-path[=<commit>]::
 	When given a range of commits to display (e.g. 'commit1..commit2'
-	or 'commit2 {caret}commit1'), only display commits in that range
+	or 'commit2 {caret}commit1'), and a commit <commit> in that range,
+	only display commits in that range
 	that are ancestors of <commit>, descendants of <commit>, or
 	<commit> itself.  If no commit is specified, use 'commit1' (the
 	excluded part of the range) as <commit>.  Can be passed multiple
-- 
2.47.1-529-gecd20ec0f1
Kai Koponen· Dec 3, 2024, 23:36 UTC · re: Junio C Hamano · lore

Re: [PATCH] doc: mention rev-list --ancestry-path restrictions

Thanks for fixing the mangling, pickiness is definitely called for a huge project like this with lots of work on the maintainers. Wish gmail didn't eat tabs in plain text mode... the github app was easier to use than I expected though.

On Tue, Dec 3, 2024 at 6:33 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 43 quoted lines
>
> "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com> writes:
>
> > Hello Kai
> >
> > I couldn’t apply this patch to `master` (cc01bad4a9f (The twelfth batch,
> > 2024-11-27)). It looks like it is because..
>
> yes it is heavily whitespace damaged.  Here is what I applied after
> manually reconstructing.
>
> --- >8 ---
> From: Kai Koponen <kaikoponen@google.com>
> Date: Tue, 3 Dec 2024 12:14:34 -0500
> Subject: [PATCH] doc: mention rev-list --ancestry-path restrictions
>
> The rev-list documentation doesn't mention that the given
> commit must be in the specified commit range, leading
> to unexpected results.
>
> Signed-off-by: Kai Koponen <kaikopone@google.com>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
>  Documentation/rev-list-options.txt | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
> index 0d90d5b154..9d5243e0aa 100644
> --- a/Documentation/rev-list-options.txt
> +++ b/Documentation/rev-list-options.txt
> @@ -401,7 +401,8 @@ Default mode::
>
>  --ancestry-path[=<commit>]::
>         When given a range of commits to display (e.g. 'commit1..commit2'
> -       or 'commit2 {caret}commit1'), only display commits in that range
> +       or 'commit2 {caret}commit1'), and a commit <commit> in that range,
> +       only display commits in that range
>         that are ancestors of <commit>, descendants of <commit>, or
>         <commit> itself.  If no commit is specified, use 'commit1' (the
>         excluded part of the range) as <commit>.  Can be passed multiple
> --
> 2.47.1-529-gecd20ec0f1
>
Junio C Hamano· Dec 3, 2024, 23:24 UTC · re: Kai Koponen · lore

Re: [PATCH] doc: mention rev-list --ancestry-path restrictions

Kai Koponen <kaikoponen@google.com> writes:
Show 24 quoted lines
> The rev-list documentation doesn't mention that the given
> commit must be in the specified commit range, leading
> to unexpected results.
>
> Signed-off-by: Kai Koponen <kaikopone@google.com>
> ---
>  Documentation/rev-list-options.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/rev-list-options.txt
> b/Documentation/rev-list-options.txt
> index 00ccf68744..f0a46f9da5 100644
> --- a/Documentation/rev-list-options.txt
> +++ b/Documentation/rev-list-options.txt
> @@ -412,7 +412,7 @@ Default mode::
>
>  --ancestry-path[=<commit>]::
>   When given a range of commits to display (e.g. 'commit1..commit2'
> - or 'commit2 {caret}commit1'), only display commits in that range
> + or 'commit2 {caret}commit1'), and a commit <commit> in that range,
> only display commits in that range
>   that are ancestors of <commit>, descendants of <commit>, or
>   <commit> itself.  If no commit is specified, use 'commit1' (the
>   excluded part of the range) as <commit>.  Can be passed multiple

Thanks for accomodating my pickyness ;-) This version reads very well.

Will queue.

← back to recent threads