git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Elijah Newren <newren@gmail.com>
To: Kai Koponen <kaikoponen@google.com>
Cc: git@vger.kernel.org
Subject: Re: rev-list --ancestry-path with arg - bug or undocumented requirement
Date: Tue, 19 Nov 2024 19:22:35 -0800	[thread overview]
Message-ID: <CABPp-BE1C2izp1a0Xm8_0KU+kas8XKejDyix+AzXqbCOeVp2Dg@mail.gmail.com> (raw)
In-Reply-To: <CADYQcGpXm=RTEYyxqdSowQ4Vg9jmXuCzOOpd-TgDX8U814BReg@mail.gmail.com>

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?

  reply	other threads:[~2024-11-20  3:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-19 21:53 rev-list --ancestry-path with arg - bug or undocumented requirement Kai Koponen
2024-11-20  3:22 ` Elijah Newren [this message]
2024-12-02 19:45   ` Kai Koponen
2024-12-02 23:48     ` Elijah Newren
2024-12-03  1:05     ` Junio C Hamano
2024-12-03 17:14       ` [PATCH] doc: mention rev-list --ancestry-path restrictions Kai Koponen
2024-12-03 17:38         ` Kristoffer Haugsbakk
2024-12-03 17:59           ` Kai Koponen
2024-12-03 20:21             ` Kai Koponen
2024-12-03 23:33           ` Junio C Hamano
2024-12-03 23:36             ` Kai Koponen
2024-12-03 23:24         ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABPp-BE1C2izp1a0Xm8_0KU+kas8XKejDyix+AzXqbCOeVp2Dg@mail.gmail.com \
    --to=newren@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kaikoponen@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).