diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-08-30 15:29:31 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-08-30 15:29:31 +0200 |
commit | 60636dd029a1e356bab8698b798504302fe645cb (patch) | |
tree | 49cfa335c09bb727d1954132075960562951a2aa /file.go | |
parent | 2c527d02ceac3879f82ab53645b6c7c03c0e5d71 (diff) | |
download | go-git-60636dd029a1e356bab8698b798504302fe645cb.tar.gz |
DiffTree based on TreeWalker
Diffstat (limited to 'file.go')
-rw-r--r-- | file.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -16,7 +16,8 @@ type File struct { Blob } -func newFile(name string, m os.FileMode, b *Blob) *File { +// NewFile returns a File based on the given blob object +func NewFile(name string, m os.FileMode, b *Blob) *File { return &File{Name: name, Mode: m, Blob: *b} } @@ -77,7 +78,7 @@ func (iter *FileIter) Next() (*File, error) { return nil, err } - return newFile(name, entry.Mode, blob), nil + return NewFile(name, entry.Mode, blob), nil } } |