MCPcopy
hub / github.com/go-git/go-git / Clone

Function Clone

repository.go:227–229  ·  view source on GitHub ↗

Clone a repository into the given Storer and worktree Filesystem with the given options, if worktree is nil a bare repository is created. If the given storer is not empty ErrRepositoryAlreadyExists is returned.

(s storage.Storer, worktree billy.Filesystem, o *CloneOptions)

Source from the content-addressed store, hash-verified

225// given options, if worktree is nil a bare repository is created. If the given
226// storer is not empty ErrRepositoryAlreadyExists is returned.
227func Clone(s storage.Storer, worktree billy.Filesystem, o *CloneOptions) (*Repository, error) {
228 return CloneContext(context.Background(), s, worktree, o)
229}
230
231// CloneContext a repository into the given Storer and worktree Filesystem with
232// the given options, if worktree is nil a bare repository is created. If the

Callers 14

TestCloneMethod · 0.85
TestCloneMirrorMethod · 0.85
TestCloneWithTagsMethod · 0.85
TestCloneSparseMethod · 0.85
TestCloneWithProgressMethod · 0.85
TestPushDepthMethod · 0.85
TestPullAddMethod · 0.85
TestPullDepthMethod · 0.85
TestCheckoutSparseMethod · 0.85

Calls 1

CloneContextFunction · 0.85

Tested by 14

TestCloneMethod · 0.68
TestCloneMirrorMethod · 0.68
TestCloneWithTagsMethod · 0.68
TestCloneSparseMethod · 0.68
TestCloneWithProgressMethod · 0.68
TestPushDepthMethod · 0.68
TestPullAddMethod · 0.68
TestPullDepthMethod · 0.68
TestCheckoutSparseMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…