File tree Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Original file line number Diff line number Diff line change @@ -10,35 +10,10 @@ import (
10
10
log "github.com/sirupsen/logrus"
11
11
"gopkg.in/src-d/go-billy.v4/helper/chroot"
12
12
git "gopkg.in/src-d/go-git.v4"
13
- "gopkg.in/src-d/go-git.v4/plumbing/object"
14
13
"gopkg.in/src-d/go-git.v4/storage/filesystem"
15
14
)
16
15
17
- // Extractor extracts commits for a given repository.
18
- type Extractor struct {
19
- iter object.CommitIter
20
- }
21
-
22
- // NewExtractor creates a new Extractor.
23
- func NewExtractor (repository * git.Repository ) (* Extractor , error ) {
24
- iter , err := repository .CommitObjects ()
25
- if err != nil {
26
- return nil , err
27
- }
28
-
29
- return & Extractor {
30
- iter : iter ,
31
- }, nil
32
- }
33
-
34
- // ExtractNextCommit extract the next commit of the repository.
35
- // It returns an io.EOF error if there are no more commits.
36
- func (e * Extractor ) ExtractNextCommit () (* object.Commit , error ) {
37
- return e .iter .Next ()
38
- }
39
-
40
16
func GetBasePathGoGitRepo (r * git.Repository ) (string , error ) {
41
- //
42
17
// Try to grab the repository Storer
43
18
s , ok := r .Storer .(* filesystem.Storage )
44
19
if ! ok {
You can’t perform that action at this time.
0 commit comments