@monsieuricon this is great! Thanks for the write up as well. This is something we might want to look at for Yocto (we could probably integrate the shallow tarball fetch & validation into our bitbake-setup command as an option).
@monsieuricon would it be better to follow this method instead?
eg.
- user issues git clone depth 1
- if it doesnβt exist in cache server, git goes thru normal path, otherwise serves the cache from https://www.kernel.org/pub/linux/kernel/shallow-tar/
- server can cleanup cache based on its own preferences (older than a month, space requirements, etc.)
@monsieuricon https://www.kernel.org/pub/linux/kernel/shallow-tar/ is when N == 1 tho right? i would assume it would make sense to only cache when N == 1 for `git clone` as well
also why prebuild instead of lazyloading (eg. cache only when a user requests)?
im just mainly curious why the kernel decided this path. i feel like transparently rerouting `git` to use the cache would be more effective than asking to use a separate mirror
@monsieuricon oh i have no idea⦠i was assuming that git had some sort of mechanism like that as it would help services like github/gitlab/codeberg etc