From d851b90f5e832fa1edeb0d408bd56ed6c1fd5e7a Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Wed, 19 Jul 2017 14:15:34 +0200 Subject: repository: allow push from shallow repositories --- plumbing/object/commit_walker_test.go | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) (limited to 'plumbing/object/commit_walker_test.go') 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) -- cgit