Re: fsck option to remove corrupt objects - why/why not?

2014-10-16 Thread Johan Herland
On Thu, Oct 16, 2014 at 2:13 AM, Ben Aveling bena@optusnet.com.au wrote: On 14/10/2014 19:21, Jeff King wrote: On Mon, Oct 13, 2014 at 09:37:27AM +1100, Ben Aveling wrote: A question about fsck - is there a reason it doesn't have an option to delete bad objects? If the objects are

Re: fsck option to remove corrupt objects - why/why not?

2014-10-16 Thread Matthieu Moy
Ben Aveling bena@optusnet.com.au 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

Re: fsck option to remove corrupt objects - why/why not?

2014-10-16 Thread Jeff King
On Thu, Oct 16, 2014 at 11:04:04AM +0200, Johan Herland wrote: I simply copied the packfile containing the good copy into the corrupted repo, and then ran a git gc, which happened to use the good copy of the corrupted object and complete successfully (instead of barfing on the bad copy). The

Re: fsck option to remove corrupt objects - why/why not?

2014-10-16 Thread Johan Herland
On Thu, Oct 16, 2014 at 2:25 PM, Jeff King p...@peff.net wrote: On Thu, Oct 16, 2014 at 11:04:04AM +0200, Johan Herland wrote: I simply copied the packfile containing the good copy into the corrupted repo, and then ran a git gc, which happened to use the good copy of the corrupted object and

Re: fsck option to remove corrupt objects - why/why not?

2014-10-16 Thread Junio C Hamano
Johan Herland jo...@herland.net writes: I simply copied the packfile containing the good copy into the corrupted repo, and then ran a git gc, which happened to use the good copy of the corrupted object and complete successfully (instead of barfing on the bad copy). The GC then removed the old

fsck option to remove corrupt objects - why/why not?

2014-10-15 Thread Ben Aveling
On 14/10/2014 19:21, Jeff King wrote: On Mon, Oct 13, 2014 at 09:37:27AM +1100, Ben Aveling wrote: A question about fsck - is there a reason it doesn't have an option to delete bad objects? If the objects are reachable, then deleting them would create other big problems (i.e., we would be