From: Matthieu Moy Date: Thu, 16 Oct 2014 11:59:13 GMT Subject: Re: fsck option to remove corrupt objects - why/why not? Message-ID: In-Reply-To: <543F0DAE.2050205@optusnet.com.au> Ben Aveling writes: > And that seems sensible to me - the object is corrupt, it is unusable, > the object graph is already broken, we already have big problems, > removing the corrupt object(s) doesn't create any new problems, and it > allows the possibility that the damaged objects can be restored. Removing completely may remove a chance to restore the corrupt object (rather unlikely, but I can imagine fine binary file surgery to un-break a broken object file). But we could move them out of Git's object directory (a bit like .git/lost-found, we could have .git/corrupt). For unpacked objects, it's trivial (just mv them in the directory). For packed objects, I don't know what happens in case they are corrupt. That would solve essentially any problem that you can solve by removing the file, but it makes the operation reversible. -- Matthieu Moy http://www-verimag.imag.fr/~moy/