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

Re: [RFC PATCH] index-pack: optionally allow duplicate objects

From
Taylor Blau <ttaylorr@openai.com>
Date
Jul 29, 2026, 21:23 UTC
Message-ID
<ampvWrDaNqmNdlUm@com-79390>
In-Reply-To
<xmqqtspho7tk.fsf@gitster.g>
On Wed, Jul 29, 2026 at 01:32:39PM -0700, Junio C Hamano wrote:
Show 14 quoted lines
> Taylor Blau <ttaylorr@openai.com> writes:
>
> > If we can find useful ways to combine the ideas above with Git's in-tree
> > implementation of upload-pack, one could imagine that Git itself may
> > eventually send packs containing duplicate copies of some object(s)
> > behind a capability. In other words, for clients that know how to
> > process such a pack, the server may wish to ask the client to do just
> > that in the name of saving some CPU cycles necessary to generate a pack
> > that doesn't have any duplicate objects.
>
> I can live with such an extension as long as we teach the receiving
> end to deduplicate the extra copy.  Leaving packs with duplicate
> objects on disk is a completely different story, as it will become a
> source of spreading such broken packs elsewhere, though.

I am trying to nudge us in the direction of reconsidering whether a pack containing duplicate objects *is* broken. After reading some of the historical discussions on the list, the only "broken" portion here is client-side support, which is what my series is trying to address.

Show 5 quoted lines
> > But I would note that having packs containing duplicate objects is not a
> > new repository state for Git. Non-strict `index-pack` accepts duplicate
> > entries today, and shallow and filtered clones can store the same pack.
>
> The same as what???

The same pack meaning the one which contains duplicate objects. As I understand, Friel configured clients to have a shallow depth equal to the 32-bit unsigned maximum value (which is gross), but does cause us to run "index-pack" without "--strict".

Thanks, Taylor

Previous: Taylor Blau
Message 8 of 8 in “index-pack: optionally allow duplicate objects”
  1. index-pack: optionally allow duplicate objectsfriel@openai.com, Jul 28, 2026
  2. Taylor BlauJul 28, 2026
  3. Junio C HamanoJul 29, 2026
  4. Taylor BlauJul 29, 2026
  5. Junio C HamanoJul 29, 2026
  6. friel@openai.comJul 29, 2026
  7. Taylor BlauJul 29, 2026
  8. Taylor BlauJul 29, 2026

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.