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

Re: pack corruption post-mortem

From
Duy Nguyen <pclouds@gmail.com>
Date
Oct 17, 2013, 01:06 UTC
Message-ID
<CACsJy8ArdCrqn58wnx9c6wx148CfnQrWPfuxH5D7s1bvwr=cjQ@mail.gmail.com>
In-Reply-To
<201310160941.16904.mfick@codeaurora.org>
On Wed, Oct 16, 2013 at 10:41 PM, Martin Fick <mfick@codeaurora.org> wrote:
Show 11 quoted lines
>> and then running "git index-pack tmp.pack" in the
>> debugger (stop at unpack_raw_entry). Doing this, I found
>> that there were 3 bytes of header (and the header itself
>> had a sane type and size). So I stripped those off with:
>>
>>   dd if=object of=zlib bs=1 skip=3
>
> This too feels like something we should be able to do with a
> plumbing command eventually?
>
> git zlib-extract

Not an official plumbing, but I faced similar problems with pack v4. I needed to verify that the output is correct and low level decoding like this is generally a good thing to start with. So I wrote test-dump [1] that can take an offset, a format and try to decode it. It does not support zlib inflation yet, but adding one should be easy. And because this is just a test program we don't really need to think hard before adding something.

[1] http://article.gmane.org/gmane.comp.version-control.git/235388
-- 
Duy
Previous: Jeff KingNext: Duy Nguyen
Message 7 of 16 in “pack corruption post-mortem”
  1. Jeff KingOct 16, 2013
  2. Duy NguyenOct 16, 2013
  3. Martin FickOct 16, 2013
  4. Jeff KingOct 17, 2013
  5. Junio C HamanoOct 17, 2013
  6. Jeff KingOct 25, 2013
  7. Duy NguyenOct 17, 2013
  8. Duy NguyenOct 19, 2013
  9. Nicolas PitreOct 19, 2013
  10. Shawn PearceOct 19, 2013
  11. Nicolas PitreOct 20, 2013
  12. Duy NguyenOct 20, 2013
  13. Nicolas PitreOct 20, 2013
  14. howto: document more tools for recovery corruptionJeff King, Apr 1, 2015
  15. Junio C HamanoApr 1, 2015
  16. Jeff KingApr 2, 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.