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

Re: [PATCH 0/1] files-backend: check symref name before update

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 2, 2025, 14:45 UTC
Message-ID
<xmqqjz1dxszl.fsf@gitster.g>
In-Reply-To
<CAOLa=ZSboPeTNSSh1fsaKc+Ef5DhaKGX+mNiRzyYfvFERa=JLQ@mail.gmail.com>
Karthik Nayak <karthik.188@gmail.com> writes:
> The bigger question for me is if there is an instance that you'd want to
> modify the HEAD file manually. Or is there a way this can be done via
> any of the existing Git commands. Otherwise, I'm not sure I would call
> this a bug.

As we discussed downthread, I tend to agree with you here that this is a corrupt repository leading the tool to do a nonsensical thing, and the true bug here is that "fsck" is not catching it. But I do not mind if we add a check at runtime, probably at the location the patch under discussion identified, that makes sure a symbolic ref points at a valid target the same way "git fsck" does.

Thanks.
Previous: Karthik Nayak
Message 11 of 11 in “files-backend: check symref name before update”
  1. 0/1 files-backend: check symref name before updateHan Young, Oct 1, 2025
  2. 1/1 files-backend: check symref name before updateHan Young, Oct 1, 2025
  3. Junio C HamanoOct 1, 2025
  4. Karthik NayakOct 2, 2025
  5. Patrick SteinhardtOct 2, 2025
  6. Junio C HamanoOct 2, 2025
  7. Patrick SteinhardtOct 2, 2025
  8. Junio C HamanoOct 2, 2025
  9. shejialuoOct 5, 2025
  10. Karthik NayakOct 2, 2025
  11. Junio C HamanoOct 2, 2025

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.