mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-19 05:02:20 +00:00
This commit changes git/cloner.go from cloning the whole history and then checking out the desired ref to a implementation that only downloads the history for the desired ref. It does so by first initializing an empty repository, setting the source repository as a remote, fetching just the desired ref and then hard resetting the empty local repo to that ref. This reduces the time it takes to build the multibases example as a remote base at ref v2.0.3 from an avg of 8s with the current implementation to an avg of 2s out of 10 runs each, by drastically decreasing the data transferred. The improvement should increase as repositories grow.