From: Jonathan Nieder Date: Mon, 03 Jun 2019 22:23:37 GMT Subject: Re: [PATCH 2/2] index-pack: prefetch missing REF_DELTA bases Message-ID: <20190603222337.GA208159@google.com> In-Reply-To: <4fcaa4481b5fd2a76aa21263f997e00913db0e0f.1557868134.git.jonathantanmy@google.com> Jonathan Tan wrote: > When fetching, the client sends "have" commit IDs indicating that the > server does not need to send any object referenced by those commits, > reducing network I/O. When the client is a partial clone, the client > still sends "have"s in this way, even if it does not have every object > referenced by a commit it sent as "have". > > If a server omits such an object, it is fine: the client could lazily > fetch that object before this fetch, and it can still do so after. > > The issue is when the server sends a thin pack containing an object that > is a REF_DELTA against such a missing object: index-pack fails to fix > the thin pack. When support for lazily fetching missing objects was > added in 8b4c0103a9 ("sha1_file: support lazily fetching missing > objects", 2017-12-08), support in index-pack was turned off in the > belief that it accesses the repo only to do hash collision checks. > However, this is not true: it also needs to access the repo to resolve > REF_DELTA bases. [...] > Signed-off-by: Jonathan Tan > --- > builtin/index-pack.c | 26 +++++++++++++++-- > t/t5616-partial-clone.sh | 61 ++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 85 insertions(+), 2 deletions(-) Thanks much. This bugfix has been working well at $DAYJOB: Tested-by: Jonathan Nieder Is it something that could be in 2.22.0 or 2.22.1?