git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Nicolas Pitre <nico@fluxnic.net>
Date
Oct 22, 2010, 21:19 UTC
Message-ID
<alpine.LFD.2.00.1010221714450.2764@xanadu.home>
In-Reply-To
<AANLkTimy-ihrF1syWYe3T4W6-UHzCaj5Jud5rdFmv3D5@mail.gmail.com>
On Fri, 22 Oct 2010, Sverre Rabbelier wrote:
Show 10 quoted lines
> Heya,
> 
> On Fri, Oct 22, 2010 at 13:26, Nicolas Pitre <nico@fluxnic.net> 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.

Nicolas
Previous: Sverre RabbelierNext: Junio C Hamano
Message 8 of 11 in “make pack-objects a bit more resilient to repo corruption”
  1. make pack-objects a bit more resilient to repo corruptionNicolas Pitre, Oct 22, 2010
  2. Jeff KingOct 22, 2010
  3. Drew NorthupOct 22, 2010
  4. Nicolas PitreOct 22, 2010
  5. Nicolas PitreOct 22, 2010
  6. make pack-objects a bit more resilient to repo corruptionNicolas Pitre, Oct 22, 2010
  7. Sverre RabbelierOct 22, 2010
  8. Nicolas PitreOct 22, 2010
  9. Junio C HamanoOct 22, 2010
  10. Geert BoschOct 24, 2010
  11. Nicolas PitreOct 24, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.