From: Taylor Blau <ttaylorr@openai.com>
To: friel@openai.com
Cc: gitster@pobox.com, git@vger.kernel.org, me@ttaylorr.com,
peff@peff.net, stolee@gmail.com, ps@pks.im,
jonathantanmy@fastmail.com
Subject: Re: [RFC PATCH] index-pack: optionally allow duplicate objects
Date: Wed, 29 Jul 2026 16:29:04 -0500 [thread overview]
Message-ID: <ampwoImYYKeYzkw7@com-79390> (raw)
In-Reply-To: <20260729211716.40166-1-friel@openai.com>
On Wed, Jul 29, 2026 at 02:17:16PM -0700, friel@openai.com wrote:
> From: Friel <friel@openai.com>
>
> On Wed, Jul 29, 2026 at 01:32:39PM -0700, Junio C Hamano wrote:
>
> > I can live with such an extension as long as we teach the receiving
> > end to deduplicate the extra copy.
>
> That makes sense. We don't want packs containing duplicate objects to
> become a persistent source of duplicate objects in other repositories.
>
> For our server, duplicate objects would be an exceptional consequence of
> an optimization, not normal operation. We have not seen duplicates in
> practice yet. But preventing them imposes a cost on every upload-pack
> request even when duplicates are rare.
To Junio's point about "these cannot go forever unchecked", I agree, and
I think this is an important internal detail which I may not have made
clear. We don't expect to send packs containing duplicate objects as a
general case, but this patch and my series are a defensive measure to
make sure clients don't immediately choke on them.
> I'll talk with Taylor about whether the client should repack when it
> detects duplicates, or whether Git already has a way to mark such a pack
> as dirty for reuse or retransmission until it has been cleaned up.
> The intent would be to pay that cost only when duplicates actually
> occur.
Let me think a little bit more about this. It would be a shame to have
to repack the entirety of the pack when there are only a few (or zero)
duplicate object entries. But if we can efficiently pluck them out of the stream
when fetching/cloning, that may be worthwhile.
FWIW, (and I'm biased, but) I still think the series this patch is based
on is worth picking up. I think it makes sense to have better support
when we *do* happen to see duplicate objects (e.g., to recover the only
good copy of some object you have, similar to Peff's argument quoted
earlier in the thread).
But "better support" can coexist with "...you still shouldn't do this".
> In all humility, thank you for reviewing and considering the RFC PATCH.
> I'm still getting acquainted with mailing list and the history of Git,
> and I'm happy to have Taylor & Ted's help.
Thanks for saying that. Welcome to the list :-).
Thanks,
Taylor
next prev parent reply other threads:[~2026-07-29 21:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 4:25 [RFC PATCH] index-pack: optionally allow duplicate objects friel
2026-07-28 23:29 ` Taylor Blau
2026-07-29 1:41 ` Junio C Hamano
2026-07-29 19:18 ` Taylor Blau
2026-07-29 20:32 ` Junio C Hamano
2026-07-29 21:17 ` friel
2026-07-29 21:29 ` Taylor Blau [this message]
2026-07-29 21:23 ` Taylor Blau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ampwoImYYKeYzkw7@com-79390 \
--to=ttaylorr@openai.com \
--cc=friel@openai.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jonathantanmy@fastmail.com \
--cc=me@ttaylorr.com \
--cc=peff@peff.net \
--cc=ps@pks.im \
--cc=stolee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.