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
Nicolas Pitre <nico@cam.org>
Date
Apr 9, 2007, 02:28 UTC
Message-ID
<alpine.LFD.0.98.0704082227580.28181@xanadu.home>
In-Reply-To
<7vr6qu768r.fsf@assigned-by-dhcp.cox.net>
On Sun, 8 Apr 2007, Junio C Hamano wrote:
Show 21 quoted lines
> Junio C Hamano <junkio@cox.net> writes:
> 
> > Dana How <danahow@gmail.com> writes:
> >
> >> Accept new 'limit' argument and check against it
> >> before each group of writes.  Update delta usability rules
> >> for possibility of delta base being in a previously-
> >> written pack. Inline sha1write_compressed() so we know
> >> the exact size of the written data when it needs to be compressed.
> >>
> >> Signed-off-by: Dana How <how@deathvalley.cswitch.com>
> >
> > My first reaction of open-coding sha1write_compressed() was
> > "Ugh", but as you are removing the only user of that function,
> > maybe this is not as bad as it looks.
> 
> Having said that, I suspect that for other possible users of
> that function we might have later, it would be a better
> interface to add an optional 'limit' and 'prelude' to
> sha1write_compressed().  The function would write prelude
> followed by the compressed payload, only if they fit the limit.

I'd wait for those possible future users to show up before doing such thing though.

Nicolas
Previous: Junio C HamanoNext: Nicolas Pitre
Message 4 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.