Re: [PATCH 1/5] refs: expose `is_pseudoref_syntax()`
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Jan 22, 2024, 15:40 UTC
- Message-ID
- <CAOLa=ZQNKCabBBx9OEmZzfEcpzmTSAh3do4EgoqMENiQW+Axgg@mail.gmail.com>
- In-Reply-To
- <xmqq34utjbz9.fsf@gitster.g>
On Fri, Jan 19, 2024 at 9:37 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 16 quoted lines
> >
> > +/*
> > + * Check whether a refname matches the pseudoref syntax. This is a surface
> > + * level check and can present false positives.
> > + */
>
> What does "false positive" mean in this context?
>
> is_pseudoref_syntax("FOO_HEAD") says "true", and then if it is
> "false positive", that would mean "FOO_HEAD" is not a pseudo ref,
> right? What can a caller of this function do to deal with a false
> positive?
>
> Or do you mean "FOO_HEAD" is still a pseudo ref, but it may not
> currently exist? That is different from "false positive".
>Yes, I think this is what I wanted to say and what you say below is what I'll change it to.
Show 9 quoted lines
> As the check is about "does it match the pseudoref syntax?", I would > understand if what you wanted to say was something like: This only > checks the syntax, and such a pseudoref may not currently exist in > the repository---for that you'd need to call read_ref_full() or > other ref API functions. > > Puzzled... > > Thanks.
Thanks!