logoalt Hacker News

eastonyesterday at 3:24 PM2 repliesview on HN

Side note: why are shallow clones evil? I always thought they were cheaper, but I guess that’s really just for my disk space. (since the server has to compute what blobs to give you instead of just “everything”?)


Replies

jacobvosmaeryesterday at 3:39 PM

Normal clones can reuse delta-compressed data the server stored on disk. Shallow clones impose a negative constraint: do not transfer data outside the requested commit depth. Pre-computed delta chains than contain unrequested data become unusable and the server must do delta compression on the fly to satsify the shallow clone.

show 1 reply
ygouzerhtoday at 3:09 AM

It's the point that surprised me the most! We always used shallow clones, to speed the CI, I didn't knew that it got that much impact server side!