Re: rather slow 'git repack' in 'blob:none' partial clones
- From
Jeff King <peff@peff.net>
- Date
- Apr 8, 2021, 00:35 UTC
- Message-ID
- <YG5PyJHqk/BjeD84@coredump.intra.peff.net>
- In-Reply-To
- <20210408000242.2465219-1-jonathantanmy@google.com>
On Wed, Apr 07, 2021 at 05:02:41PM -0700, Jonathan Tan wrote:
Show 9 quoted lines
> It seems to me that this would work. The only part I was confused about > is "packtmp", but that is just the pack directory plus a specific > prefix, so "pack-objects" will indeed see that packfile as being part of > the repository - no problem. > > repack_promisor_objects() might be able to be refactored to provide the > names in a format that we want, but looking at it, I don't think it's > possible (it just uses "packtmp", so we have the same "packtmp" > problem).
Yeah, that was the refactoring I alluded to. I think the earlier code should keep the ".tmp-%d" portion in a separate string, and then construct packtmp from that. And then we don't have to try to recover it from the concatenated string.
-Peff