Re: [PATCH v5] doc: checkout: rewrite detached HEAD state explanation
On 2026-11-11 6:14 p.m., Junio C Hamano wrote:
Show 19 quoted lines
> "Julia Evans via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
>> +current branch. Internally in Git, `HEAD` can either be stored as:
> I am not sure if I am the only one who finds this phrasing awkward.
>
> It is not like HEAD is stored (in somewhere) as something. Rather,
> HEAD *is* the container. Its implementation may be a file on the
> filesystem in reffiles backend, or a record in the reftable
> database. In either case, HEAD stores the refname of the current
> branch, or the object name of the current commit the HEAD is
> detached at.
>
> So, from that point of view, I would understand it better if the
> above said
>
> Internally in Git, `HEAD` can store either ... (branch name or
> commit object name) ...
>
> or something.
I think it does read better that way, I'll change it to that.
Show 10 quoted lines
>> diff --git a/advice.c b/advice.c
>> index 401d047391..8d2c1ff1ee 100644
>> --- a/advice.c
>> +++ b/advice.c
>> @@ -291,6 +291,7 @@ void detach_advice(const char *new_name)
>> "\n"
>> " git switch -\n"
>> "\n"
>> + "Run `git help detached-head` to learn more.\n"
> Shouldn't we be using a normal single quote instead of backtick?
Seems reasonable, I'll change it.
Will send a new version with those two things tomorrow if there's nothing else.