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

Re: [PATCH] pack-objects: disable pack reuse for object-selection options

From
Jeff King <peff@peff.net>
Date
May 9, 2017, 02:00 UTC
Message-ID
<20170509020010.meefcustv7uufard@sigill.intra.peff.net>
In-Reply-To
<xmqqd1bi7ta5.fsf@gitster.mtv.corp.google.com>
On Tue, May 09, 2017 at 09:44:50AM +0900, Junio C Hamano wrote:
Show 30 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > On Mon, May 08, 2017 at 01:56:27PM +0900, Junio C Hamano wrote:
> >
> >> Surely, even if we need to exclude some objects from an existing
> >> packfile due to these selection options, we should be able to reuse
> >> the non-excluded part, no?  The end result may involve having to
> >> pick and reuse more and smaller slices from existing packfiles,
> >> which may be much less efficient, but it is no immediately obvious
> >> to me if it leads to "need to disable".  I would understand it if it
> >> were "it becomes much less efficient and we are better off not using
> >> the bitmap code at all", though.
> >
> > Yes, it's this last bit. The main win of the packfile reuse code is that
> > it builds on the bitmaps to avoid doing as much per-object work as
> > possible. So the objects don't even get added to the list of "struct
> > object_entry", and we never consider them for the "should they be in the
> > result" checks beyond the have/want computation done by the bitmaps.
> >
> > We could add those checks in, but what's the point? The idea of the
> > reuse code is to be a fast path for serving vanilla clones. Searching
> > through all of the packfiles for a .keep entry is the antithesis of
> > that.
> 
> Ah, OK, and now I understand why you called this a "bug" (which is
> older and do not need to be addressed as part of 2.13) in the
> original message.  The new tests check requests that ought to
> produce an empty packfile as the result actually do, but with the
> current code, the reuse code does not work with --local and friends
> and ends up including what was requested to be excluded.

Right. Did you want me to try re-wording the commit message, or does it make sense now?

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 11 in “pack-objects: disable pack reuse for object-selection options”
  1. pack-objects: disable pack reuse for object-selection optionsJeff King, May 2, 2017
  2. Junio C HamanoMay 8, 2017
  3. Jeff KingMay 8, 2017
  4. Junio C HamanoMay 9, 2017
  5. Jeff KingMay 9, 2017
  6. Junio C HamanoMay 9, 2017
  7. Jeff KingMay 9, 2017
  8. Junio C HamanoMay 9, 2017
  9. Jeff KingMay 9, 2017
  10. Jeff KingMay 9, 2017
  11. Junio C HamanoMay 9, 2017

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.