aboutsummaryrefslogtreecommitdiffstats
path: root/file.go
diff options
context:
space:
mode:
Diffstat (limited to 'file.go')
-rw-r--r--file.go12
1 files changed, 2 insertions, 10 deletions
diff --git a/file.go b/file.go
index e3e8e93..76ec962 100644
--- a/file.go
+++ b/file.go
@@ -3,8 +3,6 @@ package git
import (
"bytes"
"strings"
-
- "gopkg.in/src-d/go-git.v3/core"
)
// File represents git file objects.
@@ -64,15 +62,9 @@ func (iter *FileIter) Next() (*File, error) {
return nil, err
}
- if obj.Type() != core.BlobObject {
- // Skip non-blob objects
- continue
+ if blob, ok := obj.(*Blob); ok {
+ return newFile(name, blob), nil
}
-
- blob := &Blob{}
- blob.Decode(obj)
-
- return newFile(name, blob), nil
}
}