https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
It seems that using this AND depth is pointless, so we could make --depth mutually exclusive with --shallow-with-history or something.
$ time sh -c "git fetch https://github.com/kubernetes/kubernetes a866cbe2e5bbaa01cfd5e969aa3e033f3282a8a2 --filter=blob:none && git co FETCH_HEAD"
<lots of output>
real 0m22.710s
user 0m10.751s
sys 0m5.034s
$ time sh -c "git fetch https://github.com/kubernetes/kubernetes a866cbe2e5bbaa01cfd5e969aa3e033f3282a8a2 --depth=1 && git co FETCH_HEAD"
<lots of output>
real 0m12.430s
user 0m3.089s
sys 0m1.960s
$ time sh -c "git fetch https://github.com/kubernetes/kubernetes a866cbe2e5bbaa01cfd5e969aa3e033f3282a8a2 --filter=blob:none --depth=1 && git co FETCH_HEAD"
<lots of output>
real 0m22.315s
user 0m3.618s
sys 0m1.970s
It's slower than --depth=1 but has history.
https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
It seems that using this AND depth is pointless, so we could make
--depthmutually exclusive with--shallow-with-historyor something.It's slower than
--depth=1but has history.