Skip to content

Explore shallow clone with history for v4 #701

@thockin

Description

@thockin

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.

Metadata

Metadata

Assignees

Labels

lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions