diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-03-08 23:30:52 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-03-08 23:30:52 +0100 |
commit | b35fc295b4ac531adc72fc83f2af628c7c163c0e (patch) | |
tree | 0282f20de8279db354233d1d67e3743e08509020 /file.go | |
parent | 9c9cdff966cc181296f400769d3c8596f17e743a (diff) | |
parent | 9e6a03b7956464ccd9d2fbacedd8e5cc23572d02 (diff) | |
download | go-git-b35fc295b4ac531adc72fc83f2af628c7c163c0e.tar.gz |
Merge pull request #39 from scjalliance/git-object-interface
Added Object interface for Commit, Tree, Blob and Tag
Diffstat (limited to 'file.go')
-rw-r--r-- | file.go | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -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 } } |