Hacker News (curated)new | past | comments | ask | show | jobs| show hidden

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”?)


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.

What I find remarkable is that for at least a decade, i.e., long before LLM scrapers were a thing, GitHub engineers have been reaching out to popular package manager projects, asking them to do away with shallow clones [0] [1]. They basically used the same reasoning as your comment did.

[0]: https://github.com/Homebrew/brew/pull/9383

[1]: https://github.com/CocoaPods/CocoaPods/issues/4989#issuecomm...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact | github