diff options
Diffstat (limited to 'plumbing/object')
-rw-r--r-- | plumbing/object/change_adaptor_test.go | 3 | ||||
-rw-r--r-- | plumbing/object/change_test.go | 4 | ||||
-rw-r--r-- | plumbing/object/commit_stats_test.go | 2 | ||||
-rw-r--r-- | plumbing/object/commit_test.go | 2 | ||||
-rw-r--r-- | plumbing/object/commit_walker_bfs_filtered_test.go | 14 | ||||
-rw-r--r-- | plumbing/object/commit_walker_test.go | 18 | ||||
-rw-r--r-- | plumbing/object/commitgraph/commitnode_test.go | 2 | ||||
-rw-r--r-- | plumbing/object/difftree_test.go | 3 | ||||
-rw-r--r-- | plumbing/object/file_test.go | 2 | ||||
-rw-r--r-- | plumbing/object/merge_base_test.go | 3 | ||||
-rw-r--r-- | plumbing/object/object_test.go | 3 | ||||
-rw-r--r-- | plumbing/object/patch_test.go | 2 | ||||
-rw-r--r-- | plumbing/object/tag_test.go | 2 | ||||
-rw-r--r-- | plumbing/object/tree_test.go | 2 |
14 files changed, 28 insertions, 34 deletions
diff --git a/plumbing/object/change_adaptor_test.go b/plumbing/object/change_adaptor_test.go index 6b718ff..b8dd5d1 100644 --- a/plumbing/object/change_adaptor_test.go +++ b/plumbing/object/change_adaptor_test.go @@ -11,8 +11,8 @@ import ( "github.com/go-git/go-git/v5/utils/merkletrie" "github.com/go-git/go-git/v5/utils/merkletrie/noder" + fixtures "github.com/go-git/go-git-fixtures/v4" . "gopkg.in/check.v1" - "gopkg.in/src-d/go-git-fixtures.v3" ) type ChangeAdaptorSuite struct { @@ -22,7 +22,6 @@ type ChangeAdaptorSuite struct { } func (s *ChangeAdaptorSuite) SetUpSuite(c *C) { - s.Suite.SetUpSuite(c) s.Fixture = fixtures.Basic().One() sto := filesystem.NewStorage(s.Fixture.DotGit(), cache.NewObjectLRUDefault()) s.Storer = sto diff --git a/plumbing/object/change_test.go b/plumbing/object/change_test.go index 357cb67..2c1fe37 100644 --- a/plumbing/object/change_test.go +++ b/plumbing/object/change_test.go @@ -4,6 +4,7 @@ import ( "context" "sort" + fixtures "github.com/go-git/go-git-fixtures/v4" "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/plumbing/cache" "github.com/go-git/go-git/v5/plumbing/filemode" @@ -13,7 +14,6 @@ import ( "github.com/go-git/go-git/v5/utils/merkletrie" . "gopkg.in/check.v1" - "gopkg.in/src-d/go-git-fixtures.v3" ) type ChangeSuite struct { @@ -23,7 +23,6 @@ type ChangeSuite struct { } func (s *ChangeSuite) SetUpSuite(c *C) { - s.Suite.SetUpSuite(c) s.Fixture = fixtures.ByURL("https://github.com/src-d/go-git.git"). ByTag(".git").One() sto := filesystem.NewStorage(s.Fixture.DotGit(), cache.NewObjectLRUDefault()) @@ -250,7 +249,6 @@ func (s *ChangeSuite) TestEmptyChangeFails(c *C) { // test reproducing bug #317 func (s *ChangeSuite) TestNoFileFilemodes(c *C) { - s.Suite.SetUpSuite(c) f := fixtures.ByURL("https://github.com/git-fixtures/submodule.git").One() sto := filesystem.NewStorage(f.DotGit(), cache.NewObjectLRUDefault()) diff --git a/plumbing/object/commit_stats_test.go b/plumbing/object/commit_stats_test.go index 953a9cb..bce2953 100644 --- a/plumbing/object/commit_stats_test.go +++ b/plumbing/object/commit_stats_test.go @@ -12,7 +12,7 @@ import ( "github.com/go-git/go-billy/v5/memfs" "github.com/go-git/go-billy/v5/util" . "gopkg.in/check.v1" - "gopkg.in/src-d/go-git-fixtures.v3" + "github.com/go-git/go-git-fixtures/v4" ) type CommitStatsSuite struct { diff --git a/plumbing/object/commit_test.go b/plumbing/object/commit_test.go index d56d812..28a7a81 100644 --- a/plumbing/object/commit_test.go +++ b/plumbing/object/commit_test.go @@ -8,7 +8,7 @@ import ( "strings" "time" - fixtures "gopkg.in/src-d/go-git-fixtures.v3" + fixtures "github.com/go-git/go-git-fixtures/v4" "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/plumbing/cache" diff --git a/plumbing/object/commit_walker_bfs_filtered_test.go b/plumbing/object/commit_walker_bfs_filtered_test.go index b7ee0bb..9ea7dc6 100644 --- a/plumbing/object/commit_walker_bfs_filtered_test.go +++ b/plumbing/object/commit_walker_bfs_filtered_test.go @@ -82,7 +82,7 @@ func not(filter CommitFilter) CommitFilter { // history, but e8d3ffab552895c19b9fcf7aa264d277cde33881, that is not reachable // from HEAD func (s *filterCommitIterSuite) TestFilterCommitIter(c *C) { - from := s.commit(c, s.Fixture.Head) + from := s.commit(c, plumbing.NewHash(s.Fixture.Head)) commits, err := commitsFromIter(NewFilterCommitIter(from, nil, nil)) c.Assert(err, IsNil) @@ -105,7 +105,7 @@ func (s *filterCommitIterSuite) TestFilterCommitIter(c *C) { // that matches the passed isValid filter; in this testcase, it was filtered out // all commits but one from history func (s *filterCommitIterSuite) TestFilterCommitIterWithValid(c *C) { - from := s.commit(c, s.Fixture.Head) + from := s.commit(c, plumbing.NewHash(s.Fixture.Head)) validIf := validIfCommit(plumbing.NewHash("35e85108805c84807bc66a02d91535e1e24b38b9")) commits, err := commitsFromIter(NewFilterCommitIter(from, &validIf, nil)) @@ -121,7 +121,7 @@ func (s *filterCommitIterSuite) TestFilterCommitIterWithValid(c *C) { // that matches the passed isValid filter; in this testcase, it was filtered out // only one commit from history func (s *filterCommitIterSuite) TestFilterCommitIterWithInvalid(c *C) { - from := s.commit(c, s.Fixture.Head) + from := s.commit(c, plumbing.NewHash(s.Fixture.Head)) validIf := validIfCommit(plumbing.NewHash("35e85108805c84807bc66a02d91535e1e24b38b9")) validIfNot := not(validIf) @@ -144,7 +144,7 @@ func (s *filterCommitIterSuite) TestFilterCommitIterWithInvalid(c *C) { // TestFilterCommitIterWithNoValidCommits asserts that FilterCommitIter returns // no commits if the passed isValid filter does not allow any commit func (s *filterCommitIterSuite) TestFilterCommitIterWithNoValidCommits(c *C) { - from := s.commit(c, s.Fixture.Head) + from := s.commit(c, plumbing.NewHash(s.Fixture.Head)) validIf := validIfCommit(plumbing.NewHash("THIS_COMMIT_DOES_NOT_EXIST")) commits, err := commitsFromIter(NewFilterCommitIter(from, &validIf, nil)) @@ -155,7 +155,7 @@ func (s *filterCommitIterSuite) TestFilterCommitIterWithNoValidCommits(c *C) { // TestFilterCommitIterWithStopAt asserts that FilterCommitIter returns only commits // are not beyond a isLimit filter func (s *filterCommitIterSuite) TestFilterCommitIterWithStopAt(c *C) { - from := s.commit(c, s.Fixture.Head) + from := s.commit(c, plumbing.NewHash(s.Fixture.Head)) stopAtRule := validIfCommit(plumbing.NewHash("a5b8b09e2f8fcb0bb99d3ccb0958157b40890d69")) commits, err := commitsFromIter(NewFilterCommitIter(from, nil, &stopAtRule)) @@ -177,7 +177,7 @@ func (s *filterCommitIterSuite) TestFilterCommitIterWithStopAt(c *C) { // TestFilterCommitIterWithStopAt asserts that FilterCommitIter works properly // with isValid and isLimit filters func (s *filterCommitIterSuite) TestFilterCommitIterWithInvalidAndStopAt(c *C) { - from := s.commit(c, s.Fixture.Head) + from := s.commit(c, plumbing.NewHash(s.Fixture.Head)) stopAtRule := validIfCommit(plumbing.NewHash("a5b8b09e2f8fcb0bb99d3ccb0958157b40890d69")) validIf := validIfCommit(plumbing.NewHash("35e85108805c84807bc66a02d91535e1e24b38b9")) @@ -224,7 +224,7 @@ func (s *filterCommitIterSuite) TestIteratorForEachCallbackReturn(c *C) { return nil } - from := s.commit(c, s.Fixture.Head) + from := s.commit(c, plumbing.NewHash(s.Fixture.Head)) iter := NewFilterCommitIter(from, nil, nil) err := iter.ForEach(cb) diff --git a/plumbing/object/commit_walker_test.go b/plumbing/object/commit_walker_test.go index 628adaf..c47d68b 100644 --- a/plumbing/object/commit_walker_test.go +++ b/plumbing/object/commit_walker_test.go @@ -13,7 +13,7 @@ type CommitWalkerSuite struct { var _ = Suite(&CommitWalkerSuite{}) func (s *CommitWalkerSuite) TestCommitPreIterator(c *C) { - commit := s.commit(c, s.Fixture.Head) + commit := s.commit(c, plumbing.NewHash(s.Fixture.Head)) var commits []*Commit NewCommitPreorderIter(commit, nil, nil).ForEach(func(c *Commit) error { @@ -39,7 +39,7 @@ func (s *CommitWalkerSuite) TestCommitPreIterator(c *C) { } func (s *CommitWalkerSuite) TestCommitPreIteratorWithIgnore(c *C) { - commit := s.commit(c, s.Fixture.Head) + commit := s.commit(c, plumbing.NewHash(s.Fixture.Head)) var commits []*Commit NewCommitPreorderIter(commit, nil, []plumbing.Hash{ @@ -61,7 +61,7 @@ func (s *CommitWalkerSuite) TestCommitPreIteratorWithIgnore(c *C) { } func (s *CommitWalkerSuite) TestCommitPreIteratorWithSeenExternal(c *C) { - commit := s.commit(c, s.Fixture.Head) + commit := s.commit(c, plumbing.NewHash(s.Fixture.Head)) var commits []*Commit seenExternal := map[plumbing.Hash]bool{ @@ -85,7 +85,7 @@ func (s *CommitWalkerSuite) TestCommitPreIteratorWithSeenExternal(c *C) { } func (s *CommitWalkerSuite) TestCommitPostIterator(c *C) { - commit := s.commit(c, s.Fixture.Head) + commit := s.commit(c, plumbing.NewHash(s.Fixture.Head)) var commits []*Commit NewCommitPostorderIter(commit, nil).ForEach(func(c *Commit) error { @@ -112,7 +112,7 @@ func (s *CommitWalkerSuite) TestCommitPostIterator(c *C) { } func (s *CommitWalkerSuite) TestCommitPostIteratorWithIgnore(c *C) { - commit := s.commit(c, s.Fixture.Head) + commit := s.commit(c, plumbing.NewHash(s.Fixture.Head)) var commits []*Commit NewCommitPostorderIter(commit, []plumbing.Hash{ @@ -134,7 +134,7 @@ func (s *CommitWalkerSuite) TestCommitPostIteratorWithIgnore(c *C) { } func (s *CommitWalkerSuite) TestCommitCTimeIterator(c *C) { - commit := s.commit(c, s.Fixture.Head) + commit := s.commit(c, plumbing.NewHash(s.Fixture.Head)) var commits []*Commit NewCommitIterCTime(commit, nil, nil).ForEach(func(c *Commit) error { @@ -160,7 +160,7 @@ func (s *CommitWalkerSuite) TestCommitCTimeIterator(c *C) { } func (s *CommitWalkerSuite) TestCommitCTimeIteratorWithIgnore(c *C) { - commit := s.commit(c, s.Fixture.Head) + commit := s.commit(c, plumbing.NewHash(s.Fixture.Head)) var commits []*Commit NewCommitIterCTime(commit, nil, []plumbing.Hash{ @@ -182,7 +182,7 @@ func (s *CommitWalkerSuite) TestCommitCTimeIteratorWithIgnore(c *C) { } func (s *CommitWalkerSuite) TestCommitBSFIterator(c *C) { - commit := s.commit(c, s.Fixture.Head) + commit := s.commit(c, plumbing.NewHash(s.Fixture.Head)) var commits []*Commit NewCommitIterBSF(commit, nil, nil).ForEach(func(c *Commit) error { @@ -208,7 +208,7 @@ func (s *CommitWalkerSuite) TestCommitBSFIterator(c *C) { } func (s *CommitWalkerSuite) TestCommitBSFIteratorWithIgnore(c *C) { - commit := s.commit(c, s.Fixture.Head) + commit := s.commit(c, plumbing.NewHash(s.Fixture.Head)) var commits []*Commit NewCommitIterBSF(commit, nil, []plumbing.Hash{ diff --git a/plumbing/object/commitgraph/commitnode_test.go b/plumbing/object/commitgraph/commitnode_test.go index 4f9a0b8..38d3bce 100644 --- a/plumbing/object/commitgraph/commitnode_test.go +++ b/plumbing/object/commitgraph/commitnode_test.go @@ -5,7 +5,7 @@ import ( "testing"
. "gopkg.in/check.v1"
- fixtures "gopkg.in/src-d/go-git-fixtures.v3"
+ fixtures "github.com/go-git/go-git-fixtures/v4"
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/cache"
"github.com/go-git/go-git/v5/plumbing/format/commitgraph"
diff --git a/plumbing/object/difftree_test.go b/plumbing/object/difftree_test.go index 699672b..04416c7 100644 --- a/plumbing/object/difftree_test.go +++ b/plumbing/object/difftree_test.go @@ -3,6 +3,7 @@ package object import ( "sort" + fixtures "github.com/go-git/go-git-fixtures/v4" "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/plumbing/cache" "github.com/go-git/go-git/v5/plumbing/filemode" @@ -13,7 +14,6 @@ import ( "github.com/go-git/go-git/v5/utils/merkletrie" . "gopkg.in/check.v1" - "gopkg.in/src-d/go-git-fixtures.v3" ) type DiffTreeSuite struct { @@ -24,7 +24,6 @@ type DiffTreeSuite struct { } func (s *DiffTreeSuite) SetUpSuite(c *C) { - s.Suite.SetUpSuite(c) s.Fixture = fixtures.Basic().One() sto := filesystem.NewStorage(s.Fixture.DotGit(), cache.NewObjectLRUDefault()) s.Storer = sto diff --git a/plumbing/object/file_test.go b/plumbing/object/file_test.go index dce5e91..4dfd950 100644 --- a/plumbing/object/file_test.go +++ b/plumbing/object/file_test.go @@ -10,7 +10,7 @@ import ( "github.com/go-git/go-git/v5/storage/filesystem" . "gopkg.in/check.v1" - "gopkg.in/src-d/go-git-fixtures.v3" + "github.com/go-git/go-git-fixtures/v4" ) type FileSuite struct { diff --git a/plumbing/object/merge_base_test.go b/plumbing/object/merge_base_test.go index 7d239cb..2a40f6e 100644 --- a/plumbing/object/merge_base_test.go +++ b/plumbing/object/merge_base_test.go @@ -8,8 +8,8 @@ import ( "github.com/go-git/go-git/v5/plumbing/cache" "github.com/go-git/go-git/v5/storage/filesystem" + fixtures "github.com/go-git/go-git-fixtures/v4" . "gopkg.in/check.v1" - fixtures "gopkg.in/src-d/go-git-fixtures.v3" ) func alphabeticSortCommits(commits []*Commit) { @@ -67,7 +67,6 @@ type mergeBaseSuite struct { } func (s *mergeBaseSuite) SetUpSuite(c *C) { - s.Suite.SetUpSuite(c) s.Fixture = fixtures.ByTag("merge-base").One() s.Storer = filesystem.NewStorage(s.Fixture.DotGit(), cache.NewObjectLRUDefault()) } diff --git a/plumbing/object/object_test.go b/plumbing/object/object_test.go index de5f78a..6c95eef 100644 --- a/plumbing/object/object_test.go +++ b/plumbing/object/object_test.go @@ -6,6 +6,7 @@ import ( "testing" "time" + fixtures "github.com/go-git/go-git-fixtures/v4" "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/plumbing/cache" "github.com/go-git/go-git/v5/plumbing/filemode" @@ -13,7 +14,6 @@ import ( "github.com/go-git/go-git/v5/storage/filesystem" . "gopkg.in/check.v1" - "gopkg.in/src-d/go-git-fixtures.v3" ) func Test(t *testing.T) { TestingT(t) } @@ -25,7 +25,6 @@ type BaseObjectsSuite struct { } func (s *BaseObjectsSuite) SetUpSuite(c *C) { - s.Suite.SetUpSuite(c) s.Fixture = fixtures.Basic().One() storer := filesystem.NewStorage(s.Fixture.DotGit(), cache.NewObjectLRUDefault()) s.Storer = storer diff --git a/plumbing/object/patch_test.go b/plumbing/object/patch_test.go index b4bc1e8..d4b6cd6 100644 --- a/plumbing/object/patch_test.go +++ b/plumbing/object/patch_test.go @@ -2,7 +2,7 @@ package object import ( . "gopkg.in/check.v1" - fixtures "gopkg.in/src-d/go-git-fixtures.v3" + fixtures "github.com/go-git/go-git-fixtures/v4" "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/plumbing/cache" "github.com/go-git/go-git/v5/storage/filesystem" diff --git a/plumbing/object/tag_test.go b/plumbing/object/tag_test.go index 8561112..e3f3dca 100644 --- a/plumbing/object/tag_test.go +++ b/plumbing/object/tag_test.go @@ -7,7 +7,7 @@ import ( "strings" "time" - fixtures "gopkg.in/src-d/go-git-fixtures.v3" + fixtures "github.com/go-git/go-git-fixtures/v4" "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/plumbing/cache" "github.com/go-git/go-git/v5/storage/filesystem" diff --git a/plumbing/object/tree_test.go b/plumbing/object/tree_test.go index ab1a4f9..319caae 100644 --- a/plumbing/object/tree_test.go +++ b/plumbing/object/tree_test.go @@ -11,7 +11,7 @@ import ( "github.com/go-git/go-git/v5/storage/filesystem" . "gopkg.in/check.v1" - "gopkg.in/src-d/go-git-fixtures.v3" + "github.com/go-git/go-git-fixtures/v4" ) type TreeSuite struct { |