diff options
author | Shane Da Silva <shanemichaeldasilva@gmail.com> | 2018-03-27 17:55:08 -0700 |
---|---|---|
committer | Shane Da Silva <shanemichaeldasilva@gmail.com> | 2018-03-27 17:55:08 -0700 |
commit | a3cf1237f57399759c79b0b1827724d3481c8a9e (patch) | |
tree | 0e73903d0170815d2bc5c7774b253a7ceb0b478d /blame_test.go | |
parent | 160e6d5b654fbbaf0d9264f226c56a03f0e27d30 (diff) | |
download | go-git-a3cf1237f57399759c79b0b1827724d3481c8a9e.tar.gz |
Add commit hash to blame result
Signed-off-by: Shane Da Silva <shanemichaeldasilva@gmail.com>
Diffstat (limited to 'blame_test.go')
-rw-r--r-- | blame_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/blame_test.go b/blame_test.go index 51c546a..92911b1 100644 --- a/blame_test.go +++ b/blame_test.go @@ -32,6 +32,10 @@ func (s *BlameSuite) TestBlame(c *C) { obt, err := Blame(commit, t.path) c.Assert(err, IsNil) c.Assert(obt, DeepEquals, exp) + + for i, l := range obt.Lines { + c.Assert(l.Hash.String(), Equals, t.blames[i]) + } } } @@ -54,6 +58,7 @@ func (s *BlameSuite) mockBlame(c *C, t blameTest, r *Repository) (blame *BlameRe Author: commit.Author.Email, Text: lines[i], Date: commit.Author.When, + Hash: commit.Hash, } blamedLines = append(blamedLines, l) } |