Re: pack corruption post-mortem

2013-10-25 Thread Jeff King
,0 +1,242 @@ +Date: Wed, 16 Oct 2013 04:34:01 -0400 +From: Jeff King +Subject: pack corruption post-mortem +Abstract: Recovering a corrupted object when no good copy is available. +Content-type: text/asciidoc + +How to recover an object from scratch += + +I was

Re: pack corruption post-mortem

2013-10-20 Thread Nicolas Pitre
On Sun, 20 Oct 2013, Duy Nguyen wrote: > On Sat, Oct 19, 2013 at 9:41 PM, Nicolas Pitre wrote: > > On Sat, 19 Oct 2013, Duy Nguyen wrote: > > The SHA1 used in the name of the pack file is actually the SHA1 checksum > > of the SHA1 table. > > > > The path and ident tables are already protected by

Re: pack corruption post-mortem

2013-10-20 Thread Nicolas Pitre
On Sat, 19 Oct 2013, Shawn Pearce wrote: > On Sat, Oct 19, 2013 at 7:41 AM, Nicolas Pitre wrote: > > On Sat, 19 Oct 2013, Duy Nguyen wrote: > > > >> On Wed, Oct 16, 2013 at 3:34 PM, Jeff King wrote: > >> > I was recently presented with a repository with a corrupted packfile, > >> > and was asked

Re: pack corruption post-mortem

2013-10-19 Thread Duy Nguyen
On Sat, Oct 19, 2013 at 9:41 PM, Nicolas Pitre wrote: > On Sat, 19 Oct 2013, Duy Nguyen wrote: > The SHA1 used in the name of the pack file is actually the SHA1 checksum > of the SHA1 table. > > The path and ident tables are already protected by the CRC32 in the zlib > deflated stream. > > Normal

Re: pack corruption post-mortem

2013-10-19 Thread Shawn Pearce
On Sat, Oct 19, 2013 at 7:41 AM, Nicolas Pitre wrote: > On Sat, 19 Oct 2013, Duy Nguyen wrote: > >> On Wed, Oct 16, 2013 at 3:34 PM, Jeff King wrote: >> > I was recently presented with a repository with a corrupted packfile, >> > and was asked if the data was recoverable. This post-mortem describ

Re: pack corruption post-mortem

2013-10-19 Thread Nicolas Pitre
On Sat, 19 Oct 2013, Duy Nguyen wrote: > On Wed, Oct 16, 2013 at 3:34 PM, Jeff King wrote: > > I was recently presented with a repository with a corrupted packfile, > > and was asked if the data was recoverable. This post-mortem describes > > the steps I took to investigate and fix the problem. I

Re: pack corruption post-mortem

2013-10-19 Thread Duy Nguyen
On Wed, Oct 16, 2013 at 3:34 PM, Jeff King wrote: > I was recently presented with a repository with a corrupted packfile, > and was asked if the data was recoverable. This post-mortem describes > the steps I took to investigate and fix the problem. I thought others > might find the process interes

Re: pack corruption post-mortem

2013-10-17 Thread Junio C Hamano
Jeff King writes: > On Wed, Oct 16, 2013 at 09:41:16AM -0600, Martin Fick wrote: > >> I have nightmares about this sort of thing every now and >> then, and we even experience some corruption here and there >> that needs to be fixed (mainly missing objects when we toy >> with different git repa

Re: pack corruption post-mortem

2013-10-16 Thread Duy Nguyen
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 i

Re: pack corruption post-mortem

2013-10-16 Thread Jeff King
On Wed, Oct 16, 2013 at 09:41:16AM -0600, Martin Fick wrote: > I have nightmares about this sort of thing every now and > then, and we even experience some corruption here and there > that needs to be fixed (mainly missing objects when we toy > with different git repack arguments). I cannot he

Re: pack corruption post-mortem

2013-10-16 Thread Martin Fick
On Wednesday, October 16, 2013 02:34:01 am Jeff King wrote: > I was recently presented with a repository with a > corrupted packfile, and was asked if the data was > recoverable. This post-mortem describes the steps I took > to investigate and fix the problem. I thought others > might find the proc

Re: pack corruption post-mortem

2013-10-16 Thread Duy Nguyen
On Wed, Oct 16, 2013 at 3:34 PM, Jeff King wrote: > I was recently presented with a repository with a corrupted packfile, > and was asked if the data was recoverable. This post-mortem describes > the steps I took to investigate and fix the problem. I thought others > might find the process interes

pack corruption post-mortem

2013-10-16 Thread Jeff King
I was recently presented with a repository with a corrupted packfile, and was asked if the data was recoverable. This post-mortem describes the steps I took to investigate and fix the problem. I thought others might find the process interesting, and it might help somebody in the same situation. I