Re: [PATCH v3 4/7] sequencer: treat error reading HEAD as unborn branch
- From
Brian Lyles <brianmlyles@gmail.com>
- Date
- Mar 16, 2024, 03:05 UTC
- Message-ID
- <17bd1fb6986bb4d8.70b1dd9aae081c6e.203dcd72f6563036@zivdesk>
- In-Reply-To
- <xmqqil1rjdf7.fsf@gitster.g>
On Tue, Mar 12, 2024 at 5:25 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
> "Brian Lyles" <brianmlyles@gmail.com> writes:
>
>> If I'm understanding you correctly, it sounds like you're hinting at
>> something like this:
>
> You may also want to add _READING (I do not know offhand). Also
> you'd want to make sure resolve_ref_unsafe() returned a plausible
> looking refname (i.e. passes starts_with("refs/heads/").
>
> But other than that, yeah, doing these as "extra checks" only after
> we see the primary resolve_ref("HEAD") fails was what I had in mind.
>
> Thanks.Makes sense to me. From reading the documentation for RESOLVE_REF_READING, I think we do want that as well, and the starts_with("refs/heads/") check works as expected too. I'll incorporate those into v4.
-- Thank you, Brian Lyles