Re: With big repos and slower connections, git clone can be hard to work with
- From
Jeff King <peff@peff.net>
- Date
- Jun 8, 2024, 10:38 UTC
- Message-ID
- <20240608103832.GE2659849@coredump.intra.peff.net>
- In-Reply-To
- <7de78f3d-f174-4bf6-837f-9c90bf935d21@horse64.org>
On Sat, Jun 08, 2024 at 11:44:09AM +0200, ellie wrote:
Show 5 quoted lines
> Another idea that probably is silly in some way too: couldn't after the > first error, git automatically start over and do this whole --depth=1 > followed by --deepen... automatically? I feel like anything that wouldn't > require knowing and manually doing that process would be an improvement for > people affected often by this.
I'm skeptical that shallow-cloning and deepening is a good strategy in general. Serving shallow clones like this is expensive for the server, and there's more network overhead in the back-and-forth requests.
It also only slices up the repository in one dimension. There could be a single tree that's really big, or even a single blob that you can never get past.
So yes, it may work sometimes, but I don't think it's something we should codify.
-Peff