From: Duy Nguyen Date: Thu, 17 Oct 2013 01:06:50 GMT Subject: Re: pack corruption post-mortem Message-ID: In-Reply-To: <201310160941.16904.mfick@codeaurora.org> On Wed, Oct 16, 2013 at 10:41 PM, Martin Fick wrote: >> 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