aboutsummaryrefslogtreecommitdiffstats
path: root/blame_test.go
diff options
context:
space:
mode:
authorAntonio Jesus Navarro Perez <antonio@sourced.tech>2017-03-01 17:51:11 +0100
committerAntonio Jesus Navarro Perez <antonio@sourced.tech>2017-03-06 10:37:32 +0100
commitfa75ab40f9d0447a8b670c991c3fcf8c1d5c3081 (patch)
tree2367c67a1069702822447381e31b46c8aa68688c /blame_test.go
parentf64e4b856865bc37f45e55ef094060481b53928e (diff)
downloadgo-git-fa75ab40f9d0447a8b670c991c3fcf8c1d5c3081.tar.gz
git: Repository methods changes
To have a more consistent public API, we decided to rename some methods, and add others: - Commit method renamed to CommitObject - Commits method renamed to CommitObjects - Tree method renamed to TreeObject - Trees method renamed to TreeObjects - Tags method renamed to TagObjects - Tag method renamed to TagObject - Added method Tags that returns tag references - Added method Branches that returns branch references - Added method Notes that returns note references - Added BlobObject method - Added BlobObjects method Also, we added more functionality related to references: - Added iterator to iterate References with a specific filter Some notes: - #298
Diffstat (limited to 'blame_test.go')
-rw-r--r--blame_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/blame_test.go b/blame_test.go
index 0b2126d..855e1fc 100644
--- a/blame_test.go
+++ b/blame_test.go
@@ -26,7 +26,7 @@ func (s *BlameSuite) TestBlame(c *C) {
r := s.NewRepositoryFromPackfile(fixtures.ByURL(t.repo).One())
exp := s.mockBlame(c, t, r)
- commit, err := r.Commit(plumbing.NewHash(t.rev))
+ commit, err := r.CommitObject(plumbing.NewHash(t.rev))
c.Assert(err, IsNil)
obt, err := Blame(commit, t.path)
@@ -36,7 +36,7 @@ func (s *BlameSuite) TestBlame(c *C) {
}
func (s *BlameSuite) mockBlame(c *C, t blameTest, r *Repository) (blame *BlameResult) {
- commit, err := r.Commit(plumbing.NewHash(t.rev))
+ commit, err := r.CommitObject(plumbing.NewHash(t.rev))
c.Assert(err, IsNil, Commentf("%v: repo=%s, rev=%s", err, t.repo, t.rev))
f, err := commit.File(t.path)
@@ -48,7 +48,7 @@ func (s *BlameSuite) mockBlame(c *C, t blameTest, r *Repository) (blame *BlameRe
blamedLines := make([]*Line, 0, len(t.blames))
for i := range t.blames {
- commit, err := r.Commit(plumbing.NewHash(t.blames[i]))
+ commit, err := r.CommitObject(plumbing.NewHash(t.blames[i]))
c.Assert(err, IsNil)
l := &Line{
Author: commit.Author.Email,