Re:Going down the rabbit hole of Git's new bundle-URI
by jes5199 on Sunday March 16, 2025 @08:13PM
(#43383891)
I have a vague recollection that GitHub is optimized for whole repo cloning and they were asking projects not to do shallow fetching automatically, for performance reasons
[ Parent
| on HN ]
Re:Going down the rabbit hole of Git's new bundle-URI
by sureIy on Sunday March 16, 2025 @09:21PM
(#43384268)
I don't know if that applies anymore or if it doesn't apply on GitHub Actions, but shallow clones is the default there. See `actions/checkout`
Re:Going down the rabbit hole of Git's new bundle-URI
by jakub_g on Monday March 17, 2025 @02:01PM
(#43391093)
GH Actions generally need a throwaway clone. The issue with shallow clones is that subsequent fetches can be expensive. But in CI most of the time you don't need to fetch after clone.
Re:Going down the rabbit hole of Git's new bundle-URI
by nyanpasu64 on Sunday March 16, 2025 @09:21PM
(#43384275)
As I understand this issue affected Homebrew and CocoaPods: https://github.com/CocoaPods/CocoaPods/issues/4989#issuecomm...
> Apparently, most of the initial clones are shallow, meaning that not the whole history is fetched, but just the top commit. But then subsequent fetches don't use the --depth=1 option. Ironically, this practice can be much more expensive than full fetches/clones, especially over the long term. It is usually preferable to pay the price of a full clone once, then incrementally fetch into the repository, because then Git is better able to negotiate the minimum set of changes that have to be transferred to bring the clone up to date.