diff --git a/pkg/util/git/git.go b/pkg/util/git/git.go new file mode 100644 index 0000000000000000000000000000000000000000..b0a7e086564e1e412cc93225f678d3abf6bb32ef --- /dev/null +++ b/pkg/util/git/git.go @@ -0,0 +1,15 @@ +// Package git is a facade for git methods used by boilr +package git + +import git "srcd.works/go-git.v4" + +// CloneOptions are used when cloning a git repository +type CloneOptions git.CloneOptions + +// Clone clones a git repository with the given options +func Clone(dir string, opts CloneOptions) error { + o := git.CloneOptions(opts) + + _, err := git.PlainClone(dir, false, &o) + return err +}