Re: [PATCH v2] make pack-objects a bit more resilient to repo corruption

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Oct 22, 2010, at 17:19, Nicolas Pitre wrote:

>> On Fri, Oct 22, 2010 at 13:26, Nicolas Pitre <nico@xxxxxxxxxxx> wrote:
>>> +                               static int warned = 0;
>>> +                               if (!warned++)
>>> +                                       warning("object %s cannot be read",
>>> +                                               sha1_to_hex(src_entry->idx.sha1));
>> 
>> How does this handle multiple missing objects? Will it only warn for
>> the first one?
> 
> Yes, only the first one, so you have a bone to chase if that ever 
> happens to you.  And that's good enough IMHO.  Trying to warn for every 
> missing object would require extra storage per object to remember if any 
> particular object was warned for already, which is I think overkill for 
> an extremely unlikely event.  Comprehensive reporting is the job of 
> fsck.

Maybe add a ", run git fsck" to the message. Will still comfortably fit a line.

  -Geert--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]