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

Re: [PATCH 5/8] get-repack --max-pack-size: write_object() takes 'limit' arg

From
DHDana How <danahow@gmail.com>
Date
Apr 9, 2007, 19:20 UTC
Message-ID
<56b7f5510704091220w69529e72n2f982c097c4e26a0@mail.gmail.com>
In-Reply-To
<alpine.LFD.0.98.0704091455100.28181@xanadu.home>
On 4/9/07, Nicolas Pitre <nico@cam.org> wrote:
Show 14 quoted lines
> On Mon, 9 Apr 2007, Dana How wrote:
> > On 4/8/07, Nicolas Pitre <nico@cam.org> wrote:
> > > > +                     sha1write(f, header, hdrlen);
> > > >                       sha1write(f, header + pos, sizeof(header) - pos);
> > >
> > > The above looks rather buggy to me.
> >
> > OK, can you be more specific?
>
> You're writing the content of the array 'header' twice in a row.  Sure
> the second time it is header + pos but it is still the result of an
> operation that used to put data into 'header' after the first content
> was already written out.  Right now it looks like the first write might
> contain clobbered data.
Thanks,  I'll take care of that.

For testing, I've been using git-fsck/git-verify-pack/git-unpack-objects . The only bugs they ever caught were (1) offset wraparound in .idx before I started this patchset (with a very bad error message) and (2) I failed to flush out the buffer before changing packs. Everything else has been detected manually (not always by me). Hmm.

Thanks,
-- 
Dana L. How  danahow@gmail.com  +1 650 804 5991 cell
Previous: Nicolas PitreNext: Nicolas Pitre
Message 8 of 10 in “get-repack --max-pack-size: write_object() takes 'limit' arg”
  1. 5/8 get-repack --max-pack-size: write_object() takes 'limit' argDana How, Apr 8, 2007
  2. Junio C HamanoApr 9, 2007
  3. Junio C HamanoApr 9, 2007
  4. Nicolas PitreApr 9, 2007
  5. Nicolas PitreApr 9, 2007
  6. Dana HowApr 9, 2007
  7. Nicolas PitreApr 9, 2007
  8. Dana HowApr 9, 2007
  9. Nicolas PitreApr 9, 2007
  10. Junio C HamanoApr 9, 2007

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.