forked from tangled.org/core
this repo has no description
at fork-repo 337 B view raw
1package git 2 3import ( 4 "fmt" 5 6 "github.com/go-git/go-git/v5" 7) 8 9func Fork(repoPath, source string) error { 10 _, err := git.PlainClone(repoPath, true, &git.CloneOptions{ 11 URL: source, 12 Depth: 1, 13 SingleBranch: false, 14 }) 15 16 if err != nil { 17 return fmt.Errorf("failed to bare clone repository: %w", err) 18 } 19 return nil 20}