Re: [PATCH] promisor-remote.c: use oidset for deduplication
- From
- Jonathan Tan <jonathantanmy@google.com>
- Date
- Jan 25, 2022, 19:17 UTC
- Message-ID
- <20220125191701.2649292-1-jonathantanmy@google.com>
- In-Reply-To
- <E5AD42A3-AEAC-44F8-B223-90E2ACAEFCB0@gmail.com>
John Cai <johncai86@gmail.com> writes:
> Jonathan, how often do we expect diff to pass duplicate oids to > promisor_remote_get_direct()?
I don't recall all the details, but not often, I believe. In a partial clone, I envision that you would typically diff one tree that you have all blobs for and one tree that you don't (or two trees that you have all blobs for). If a user is in a sparse checkout and/or they're diffing two trees that they have never checked out, I would recommend disabling inexact copy detection to reduce the number of blobs that Git would need to fetch. In these cases, I think that diff would only pass duplicate OIDs if one of the trees references the same object more than once (directly or indirectly).