diff options
author | Alberto Cortés <alberto@sourced.tech> | 2015-11-16 03:20:01 +0100 |
---|---|---|
committer | Alberto Cortés <alberto@sourced.tech> | 2015-11-25 11:09:51 +0100 |
commit | d643cea1e8a6d618b2eddfdbed086c7bdf208658 (patch) | |
tree | b862c72ccb674910d24eac2ab424a7fb5ea3f0fb /tree.go | |
parent | caab43e7f4ee10a15b2af826485b688473b34356 (diff) | |
download | go-git-d643cea1e8a6d618b2eddfdbed086c7bdf208658.tar.gz |
Blame support for files
This also includes a diff package and revlist package (needed by
blame)
Some extra packfiles (<1MB) are also included, to be used as fixtures in
the tests.
Diffstat (limited to 'tree.go')
-rw-r--r-- | tree.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -50,7 +50,7 @@ func (t *Tree) walkEntries(base string, ch chan *File) { blob := &Blob{} blob.Decode(obj) - ch <- &File{Name: filepath.Join(base, entry.Name), Reader: blob.Reader()} + ch <- &File{Name: filepath.Join(base, entry.Name), Reader: blob.Reader(), Hash: entry.Hash} } } @@ -119,4 +119,5 @@ func (i *TreeIter) Next() (*Tree, error) { type File struct { Name string io.Reader + Hash core.Hash } |