Skip to content

Commit 9d50e21

Browse files
author
jguerreiro
committed
feat(cloner): remove in memory cloner
1 parent d9206e7 commit 9d50e21

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

cloner/cloner.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,13 @@ import (
88
"gopkg.in/src-d/go-git.v4/plumbing/cache"
99
"gopkg.in/src-d/go-git.v4/plumbing/transport"
1010
"gopkg.in/src-d/go-git.v4/storage/filesystem"
11-
"gopkg.in/src-d/go-git.v4/storage/memory"
1211
)
1312

1413
// Cloner represents a cloner of git repository.
1514
type Cloner interface {
1615
CloneRepository(url string, auth transport.AuthMethod) (*git.Repository, error)
1716
}
1817

19-
// MemoryCloner clones a git repository in memory.
20-
type MemoryCloner struct{}
21-
22-
// CloneRepository clones a git repository given its information.
23-
func (*MemoryCloner) CloneRepository(url string, auth transport.AuthMethod) (*git.Repository, error) {
24-
return git.Clone(memory.NewStorage(), nil, &git.CloneOptions{
25-
URL: url,
26-
Progress: ioutil.Discard,
27-
Auth: auth,
28-
})
29-
}
30-
3118
// DiskCloner closes a git repository on disk in a temporary file.
3219
type DiskCloner struct{}
3320

0 commit comments

Comments
 (0)