Re: How to replace a single corrupt, packed object?
- From
Nicolas Pitre <nico@cam.org>
- Date
- Sep 15, 2008, 16:26 UTC
- Message-ID
- <alpine.LFD.1.10.0809151223570.6279@xanadu.home>
- In-Reply-To
- <alpine.DEB.1.00.0809151603390.13830@pacific.mpi-cbg.de.mpi-cbg.de>
On Mon, 15 Sep 2008, Johannes Schindelin wrote:
Show 35 quoted lines
> On Sun, 10 Aug 2008, Nicolas Pitre wrote: > > > On Fri, 8 Aug 2008, Johannes Schindelin wrote: > > > > > my auto gc kicked in, and shows this: > > > > > > fatal: corrupt packed object for 2c1e128aa51e3a64bd61556c0cd488628b423ccf > > > error: failed to run repack > > > > > > Fortunately, I have the uncorrupted object somewhere else. So I copy the > > > single object as a loose one, and all is fine. Right? > > > > > > Wrong. > > > > Well, to be sure things are then right or wrong, just do a > > > > git show 2c1e128aa51e3a64bd61556c0cd488628b423ccf > > > > If you can't see the object before, and are able to see it once it has > > been copied over, then things are "right". > > > > > Repack still picks up the corrupt object instead of the good one. > > > What's the best way out? > > > > How do you repack? The only way to get rid of a corrupted object in > > that case is to 'git repack -a -f'. > > Turns out I am a complete, utter moron. And I am sure René will quote me > on that. > > Git would probably have taken the copied-over object, and now took the > copied-over pack (finally!). > > My mistake was to keep the .keep file. And the corrupt object was -- you > guessed it -- in the corresponding .pack file.
OK. Then I'll dig my patch out and write a test for it before submitting it to Junio.
Nicolas