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

3 messages from 2024-12-03 to 2024-12-04. Participants: Kai Koponen via GitGitGadget, Elijah Newren, Junio C Hamano.
Thread: https://gitlist.dev/t/62594

## Kai Koponen via GitGitGadget, 2024-12-03 20:18

Subject: [PATCH] doc: mention rev-list --ancestry-path restrictions
Message-ID: <pull.1838.git.git.1733257083739.gitgitgadget@gmail.com>
URL: https://gitlist.dev/e/pull.1838.git.git.1733257083739.gitgitgadget%40gmail.com

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

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

Signed-off-by: Kai Koponen <kaikoponen@google.com>
---
    doc: mention rev-list --ancestry-path restrictions

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1838%2Fgkaikoponen%2Fmaster-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1838/gkaikoponen/master-v1
Pull-Request: https://github.com/git/git/pull/1838

 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 00ccf687441..459e5a02f52 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -412,7 +412,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

base-commit: cc01bad4a9f566cf4453c7edd6b433851b0835e2
-- 
gitgitgadget

```

## Elijah Newren, 2024-12-03 22:22

Subject: Re: [PATCH] doc: mention rev-list --ancestry-path restrictions
Message-ID: <CABPp-BEiYvz-0MDS92iSb1Bj_UyBBUjy6D5SDsbPcoPnjzjucg@mail.gmail.com>
URL: https://gitlist.dev/e/CABPp-BEiYvz-0MDS92iSb1Bj_UyBBUjy6D5SDsbPcoPnjzjucg%40mail.gmail.com
In-Reply-To: <pull.1838.git.git.1733257083739.gitgitgadget@gmail.com>

```
On Tue, Dec 3, 2024 at 12:18 PM Kai Koponen via GitGitGadget
<gitgitgadget@gmail.com> wrote:
>
> From: Kai Koponen <kaikoponen@google.com>
>
> The rev-list documention doesn't mention that the given
> commit must be in the specified commit range, leading
> to unexpected results.
>
> Signed-off-by: Kai Koponen <kaikoponen@google.com>
> ---
>     doc: mention rev-list --ancestry-path restrictions
>
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1838%2Fgkaikoponen%2Fmaster-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1838/gkaikoponen/master-v1
> Pull-Request: https://github.com/git/git/pull/1838
>
>  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 00ccf687441..459e5a02f52 100644
> --- a/Documentation/rev-list-options.txt
> +++ b/Documentation/rev-list-options.txt
> @@ -412,7 +412,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
>
> base-commit: cc01bad4a9f566cf4453c7edd6b433851b0835e2
> --
> gitgitgadget

Might be worth linking to the thread where this was discussed (in
single-commit gitgitgadget PRs, that'd be done in the PR description),
over here: https://lore.kernel.org/git/CADYQcGpXm=RTEYyxqdSowQ4Vg9jmXuCzOOpd-TgDX8U814BReg@mail.gmail.com/

Anyway, patch looks good to me.

```

## Junio C Hamano, 2024-12-04 00:10

Subject: Re: [PATCH] doc: mention rev-list --ancestry-path restrictions
Message-ID: <xmqqiks071g4.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqiks071g4.fsf%40gitster.g
In-Reply-To: <pull.1838.git.git.1733257083739.gitgitgadget@gmail.com>

```
"Kai Koponen via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Kai Koponen <kaikoponen@google.com>
>
> The rev-list documention doesn't mention that the given
> commit must be in the specified commit range, leading
> to unexpected results.
>
> Signed-off-by: Kai Koponen <kaikoponen@google.com>
> ---
>     doc: mention rev-list --ancestry-path restrictions

Thanks.

```
