Skip to content

Commit badc9db

Browse files
amandelAndreas MandelStratus3D
authored
fix: shallow clone plugin repositories for faster installs (#2256)
Co-authored-by: Andreas Mandel <andreas.mandel@mailbox.oeg> Co-authored-by: Trevor Brown <Stratus3D@users.noreply.github.com>
1 parent 51ebfb4 commit badc9db

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

internal/git/git.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ func NewRepo(directory string) Repo {
4141

4242
// Clone installs a plugin via Git
4343
func (r Repo) Clone(pluginURL, ref string) error {
44-
cmdStr := []string{"git", "clone", pluginURL, r.Directory}
44+
cmdStr := []string{"git", "clone", "--depth", "1", pluginURL, r.Directory}
4545

4646
if ref != "" {
47-
cmdStr = []string{"git", "clone", pluginURL, r.Directory, "--branch", ref}
47+
cmdStr = []string{"git", "clone", "--depth", "1", pluginURL, r.Directory, "--branch", ref}
4848
}
4949

5050
_, stderr, err := exec(cmdStr)

0 commit comments

Comments
 (0)