aboutsummaryrefslogtreecommitdiffstats
path: root/references_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 /references_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 'references_test.go')
-rw-r--r--references_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/references_test.go b/references_test.go
index 74cf7de..f9fd292 100644
--- a/references_test.go
+++ b/references_test.go
@@ -291,7 +291,7 @@ func (s *ReferencesSuite) TestRevList(c *C) {
for _, t := range referencesTests {
r := s.NewRepositoryFromPackfile(fixtures.ByURL(t.repo).One())
- commit, err := r.Commit(plumbing.NewHash(t.commit))
+ commit, err := r.CommitObject(plumbing.NewHash(t.commit))
c.Assert(err, IsNil)
revs, err := References(commit, t.path)
@@ -300,7 +300,7 @@ func (s *ReferencesSuite) TestRevList(c *C) {
for i := range revs {
if revs[i].Hash.String() != t.revs[i] {
- commit, err := s.Repository.Commit(plumbing.NewHash(t.revs[i]))
+ commit, err := s.Repository.CommitObject(plumbing.NewHash(t.revs[i]))
c.Assert(err, IsNil)
equiv, err := equivalent(t.path, revs[i], commit)
c.Assert(err, IsNil)
@@ -358,7 +358,7 @@ func (s *ReferencesSuite) commits(c *C, repo string, hs ...string) []*object.Com
result := make([]*object.Commit, 0, len(hs))
for _, h := range hs {
- commit, err := r.Commit(plumbing.NewHash(h))
+ commit, err := r.CommitObject(plumbing.NewHash(h))
c.Assert(err, IsNil)
result = append(result, commit)