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

Re: Analyzing a corrupted index file

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 8, 2024, 19:51 UTC
Message-ID
<xmqqh6jnk3i8.fsf@gitster.g>
In-Reply-To
<B38C5D82-33E3-4D10-8119-7E0D59DD3DA2@lemon.garden>
Nathan Manceaux-Panot <fresh.tree3651@lemon.garden> writes:
> I have a corrupted git index file, and am trying to read it by
> hand, to understand what's wrong with it. Are there any tools
> that'll let me parse the on-disk, binary version of the index
> file, to unpack it into a human-readable data structure?

"git ls-files" with its various options is probably the closest, but even the command is not meant for "debugging the bits". It is more about showing lower-level details of a working index file to help diagnose the mismatch between end-user expectation and the reality (e.g. the user says the conflicts were all resolved, an expert asks to run "ls-files -u" and together they discover that there are paths that are still unmerged).

Previous: Nathan Manceaux-PanotNext: Nathan Manceaux-Panot
Message 2 of 4 in “Analyzing a corrupted index file”
  1. Nathan Manceaux-PanotJan 7, 2024
  2. Junio C HamanoJan 8, 2024
  3. Nathan Manceaux-PanotJan 9, 2024
  4. Junio C HamanoJan 9, 2024

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.