diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-07-19 14:15:34 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2017-07-19 14:15:34 +0200 |
commit | d851b90f5e832fa1edeb0d408bd56ed6c1fd5e7a (patch) | |
tree | ab25942ff243173a27979bc357d6bc516dda65d1 /plumbing/object | |
parent | 95bfc7e1c1b7101f2cd605cda58c1fb43d501d35 (diff) | |
download | go-git-d851b90f5e832fa1edeb0d408bd56ed6c1fd5e7a.tar.gz |
repository: allow push from shallow repositories
Diffstat (limited to 'plumbing/object')
-rw-r--r-- | plumbing/object/commit_walker_test.go | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/plumbing/object/commit_walker_test.go b/plumbing/object/commit_walker_test.go index 81795f3..48b504d 100644 --- a/plumbing/object/commit_walker_test.go +++ b/plumbing/object/commit_walker_test.go @@ -1,7 +1,10 @@ package object -import . "gopkg.in/check.v1" -import "gopkg.in/src-d/go-git.v4/plumbing" +import ( + "gopkg.in/src-d/go-git.v4/plumbing" + + . "gopkg.in/check.v1" +) type CommitWalkerSuite struct { BaseObjectsSuite @@ -57,27 +60,6 @@ func (s *CommitWalkerSuite) TestCommitPreIteratorWithIgnore(c *C) { } } -func (s *CommitWalkerSuite) TestCommitPreIteratorWithIgnoreFirst(c *C) { - commit := s.commit(c, s.Fixture.Head) - - var commits []*Commit - NewCommitPreorderIter(commit, []plumbing.Hash{ - plumbing.NewHash("6ecf0ef2c2dffb796033e5a02219af86ec6584e5"), - }).ForEach(func(c *Commit) error { - commits = append(commits, c) - return nil - }) - - c.Assert(commits, HasLen, 2) - - expected := []string{ - "6ecf0ef2c2dffb796033e5a02219af86ec6584e5", - } - for i, commit := range commits { - c.Assert(commit.Hash.String(), Equals, expected[i]) - } -} - func (s *CommitWalkerSuite) TestCommitPostIterator(c *C) { commit := s.commit(c, s.Fixture.Head) |