git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [BUG?] HEAD detached at HEAD

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 21, 2015, 17:20 UTC
Message-ID
<xmqq8u7zbsfm.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<vpqlhc3h7e7.fsf@anie.imag.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Show 11 quoted lines
> I investigated a bit more. The root of the problem is "git checkout
> --detach" and the reflog. Here's a reproduction script:
> ...
> If one replaces "git checkout --detach" with "git checkout HEAD^0", then
> the output is the one I expected:
>
>   HEAD detached at cb39b20
>
> The guilty line in the reflog is:
>
>   checkout: moving from master to HEAD

Yeah, that sounds broken. --detach should write the same reflog entry as "git checkout HEAD^0".

Previous: Matthieu Moy
Message 9 of 9 in “[BUG?] HEAD detached at HEAD”
  1. Matthieu MoySep 18, 2015
  2. Jacob KellerSep 18, 2015
  3. Matthieu MoySep 18, 2015
  4. Stefan BellerSep 18, 2015
  5. Matthieu MoySep 18, 2015
  6. Michael J GruberSep 21, 2015
  7. Michael J GruberSep 21, 2015
  8. Matthieu MoySep 21, 2015
  9. Junio C HamanoSep 21, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.