From: Patrick Steinhardt Date: Tue, 13 Jan 2026 07:30:38 GMT Subject: Re: [PATCH v10 5/8] replay: support updating detached HEAD Message-ID: In-Reply-To: On Mon, Jan 12, 2026 at 10:00:53PM -0800, Elijah Newren wrote: > On Mon, Jan 12, 2026 at 6:17 AM Patrick Steinhardt wrote: > [...] > > + refs_read_ref_full(get_main_ref_store(repo), "HEAD", > > + RESOLVE_REF_NO_RECURSE, NULL, &head_flags); > > + *detached_head = !(head_flags & REF_ISSYMREF); > > Ah, I like this simpler way to determine if we have a detached HEAD. > Out of curiosity, though, is there a need to specify > RESOLVE_REF_NO_RECURSE? I waffled on that for a bit and just left it > out. There isn't, but I felt like it clarifies that we really only care about the immediate ref's value. It's also more efficient, even though that does not matter at all in the grand scheme of things. Patrick