aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing')
-rw-r--r--plumbing/format/commitgraph/commitgraph_test.go2
-rw-r--r--plumbing/format/config/decoder.go2
-rw-r--r--plumbing/format/idxfile/decoder_test.go8
-rw-r--r--plumbing/format/idxfile/encoder_test.go2
-rw-r--r--plumbing/format/idxfile/idxfile_test.go2
-rw-r--r--plumbing/format/idxfile/writer_test.go2
-rw-r--r--plumbing/format/index/decoder_test.go2
-rw-r--r--plumbing/format/packfile/encoder_advanced_test.go2
-rw-r--r--plumbing/format/packfile/encoder_test.go2
-rw-r--r--plumbing/format/packfile/packfile_test.go8
-rw-r--r--plumbing/format/packfile/parser_test.go14
-rw-r--r--plumbing/format/packfile/scanner_test.go6
-rw-r--r--plumbing/object/change_adaptor_test.go3
-rw-r--r--plumbing/object/change_test.go4
-rw-r--r--plumbing/object/commit_stats_test.go2
-rw-r--r--plumbing/object/commit_test.go2
-rw-r--r--plumbing/object/commit_walker_bfs_filtered_test.go14
-rw-r--r--plumbing/object/commit_walker_test.go18
-rw-r--r--plumbing/object/commitgraph/commitnode_test.go2
-rw-r--r--plumbing/object/difftree_test.go3
-rw-r--r--plumbing/object/file_test.go2
-rw-r--r--plumbing/object/merge_base_test.go3
-rw-r--r--plumbing/object/object_test.go3
-rw-r--r--plumbing/object/patch_test.go2
-rw-r--r--plumbing/object/tag_test.go2
-rw-r--r--plumbing/object/tree_test.go2
-rw-r--r--plumbing/revlist/revlist_test.go3
-rw-r--r--plumbing/transport/file/common_test.go4
-rw-r--r--plumbing/transport/file/receive_pack_test.go2
-rw-r--r--plumbing/transport/file/server_test.go2
-rw-r--r--plumbing/transport/file/upload_pack_test.go6
-rw-r--r--plumbing/transport/git/common_test.go2
-rw-r--r--plumbing/transport/git/receive_pack_test.go2
-rw-r--r--plumbing/transport/git/upload_pack_test.go2
-rw-r--r--plumbing/transport/http/common_test.go2
-rw-r--r--plumbing/transport/http/receive_pack_test.go2
-rw-r--r--plumbing/transport/http/upload_pack_test.go2
-rw-r--r--plumbing/transport/server/server_test.go3
-rw-r--r--plumbing/transport/ssh/upload_pack_test.go4
-rw-r--r--plumbing/transport/test/receive_pack.go40
40 files changed, 82 insertions, 108 deletions
diff --git a/plumbing/format/commitgraph/commitgraph_test.go b/plumbing/format/commitgraph/commitgraph_test.go
index ebfe7e2..7d7444b 100644
--- a/plumbing/format/commitgraph/commitgraph_test.go
+++ b/plumbing/format/commitgraph/commitgraph_test.go
@@ -7,7 +7,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/format/commitgraph"
)
diff --git a/plumbing/format/config/decoder.go b/plumbing/format/config/decoder.go
index 0f02ce1..8e52d57 100644
--- a/plumbing/format/config/decoder.go
+++ b/plumbing/format/config/decoder.go
@@ -3,7 +3,7 @@ package config
import (
"io"
- "github.com/src-d/gcfg"
+ "github.com/go-git/gcfg"
)
// A Decoder reads and decodes config files from an input stream.
diff --git a/plumbing/format/idxfile/decoder_test.go b/plumbing/format/idxfile/decoder_test.go
index 286fe6f..467e242 100644
--- a/plumbing/format/idxfile/decoder_test.go
+++ b/plumbing/format/idxfile/decoder_test.go
@@ -11,8 +11,8 @@ import (
"github.com/go-git/go-git/v5/plumbing"
. "github.com/go-git/go-git/v5/plumbing/format/idxfile"
+ fixtures "github.com/go-git/go-git-fixtures/v4"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-git-fixtures.v3"
)
func Test(t *testing.T) { TestingT(t) }
@@ -48,7 +48,7 @@ func (s *IdxfileSuite) TestDecode(c *C) {
c.Assert(crc32, Equals, uint32(3645019190))
c.Assert(fmt.Sprintf("%x", idx.IdxChecksum), Equals, "fb794f1ec720b9bc8e43257451bd99c4be6fa1c9")
- c.Assert(fmt.Sprintf("%x", idx.PackfileChecksum), Equals, f.PackfileHash.String())
+ c.Assert(fmt.Sprintf("%x", idx.PackfileChecksum), Equals, f.PackfileHash)
}
func (s *IdxfileSuite) TestDecode64bitsOffsets(c *C) {
@@ -118,10 +118,6 @@ ch2xUA==
`
func BenchmarkDecode(b *testing.B) {
- if err := fixtures.Init(); err != nil {
- b.Errorf("unexpected error initializing fixtures: %s", err)
- }
-
f := fixtures.Basic().One()
fixture, err := ioutil.ReadAll(f.Idx())
if err != nil {
diff --git a/plumbing/format/idxfile/encoder_test.go b/plumbing/format/idxfile/encoder_test.go
index 9321f4f..81abb3b 100644
--- a/plumbing/format/idxfile/encoder_test.go
+++ b/plumbing/format/idxfile/encoder_test.go
@@ -7,7 +7,7 @@ import (
. "github.com/go-git/go-git/v5/plumbing/format/idxfile"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-git-fixtures.v3"
+ "github.com/go-git/go-git-fixtures/v4"
)
func (s *IdxfileSuite) TestDecodeEncode(c *C) {
diff --git a/plumbing/format/idxfile/idxfile_test.go b/plumbing/format/idxfile/idxfile_test.go
index ddb561b..5ef73d7 100644
--- a/plumbing/format/idxfile/idxfile_test.go
+++ b/plumbing/format/idxfile/idxfile_test.go
@@ -11,7 +11,7 @@ import (
"github.com/go-git/go-git/v5/plumbing/format/idxfile"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-git-fixtures.v3"
+ "github.com/go-git/go-git-fixtures/v4"
)
func BenchmarkFindOffset(b *testing.B) {
diff --git a/plumbing/format/idxfile/writer_test.go b/plumbing/format/idxfile/writer_test.go
index 5ced785..f86342f 100644
--- a/plumbing/format/idxfile/writer_test.go
+++ b/plumbing/format/idxfile/writer_test.go
@@ -10,7 +10,7 @@ import (
"github.com/go-git/go-git/v5/plumbing/format/packfile"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-git-fixtures.v3"
+ "github.com/go-git/go-git-fixtures/v4"
)
type WriterSuite struct {
diff --git a/plumbing/format/index/decoder_test.go b/plumbing/format/index/decoder_test.go
index 3555f7b..4e47dde 100644
--- a/plumbing/format/index/decoder_test.go
+++ b/plumbing/format/index/decoder_test.go
@@ -7,7 +7,7 @@ import (
"github.com/go-git/go-git/v5/plumbing/filemode"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-git-fixtures.v3"
+ "github.com/go-git/go-git-fixtures/v4"
)
func Test(t *testing.T) { TestingT(t) }
diff --git a/plumbing/format/packfile/encoder_advanced_test.go b/plumbing/format/packfile/encoder_advanced_test.go
index e63b5b5..21bf3ae 100644
--- a/plumbing/format/packfile/encoder_advanced_test.go
+++ b/plumbing/format/packfile/encoder_advanced_test.go
@@ -15,7 +15,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 EncoderAdvancedSuite struct {
diff --git a/plumbing/format/packfile/encoder_test.go b/plumbing/format/packfile/encoder_test.go
index 1721625..80d1e73 100644
--- a/plumbing/format/packfile/encoder_test.go
+++ b/plumbing/format/packfile/encoder_test.go
@@ -11,7 +11,7 @@ import (
"github.com/go-git/go-git/v5/storage/memory"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-git-fixtures.v3"
+ "github.com/go-git/go-git-fixtures/v4"
)
type EncoderSuite struct {
diff --git a/plumbing/format/packfile/packfile_test.go b/plumbing/format/packfile/packfile_test.go
index 882a907..8b1b934 100644
--- a/plumbing/format/packfile/packfile_test.go
+++ b/plumbing/format/packfile/packfile_test.go
@@ -5,12 +5,12 @@ import (
"math"
"github.com/go-git/go-billy/v5/osfs"
- . "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/format/idxfile"
"github.com/go-git/go-git/v5/plumbing/format/packfile"
"github.com/go-git/go-git/v5/plumbing/storer"
+ . "gopkg.in/check.v1"
)
type PackfileSuite struct {
@@ -49,7 +49,7 @@ func (s *PackfileSuite) TestGetByOffset(c *C) {
func (s *PackfileSuite) TestID(c *C) {
id, err := s.p.ID()
c.Assert(err, IsNil)
- c.Assert(id, Equals, s.f.PackfileHash)
+ c.Assert(id.String(), Equals, s.f.PackfileHash)
}
func (s *PackfileSuite) TestGetAll(c *C) {
@@ -297,7 +297,7 @@ func (s *PackfileSuite) TestSize(c *C) {
c.Assert(size, Equals, int64(76110))
// Get the size of the root commit, which is delta-encoded.
- offset, err = packfile.FindOffset(f.Head)
+ offset, err = packfile.FindOffset(plumbing.NewHash(f.Head))
c.Assert(err, IsNil)
size, err = packfile.GetSizeByOffset(offset)
c.Assert(err, IsNil)
diff --git a/plumbing/format/packfile/parser_test.go b/plumbing/format/packfile/parser_test.go
index 9d97cef..fb5fb7f 100644
--- a/plumbing/format/packfile/parser_test.go
+++ b/plumbing/format/packfile/parser_test.go
@@ -9,8 +9,8 @@ import (
"github.com/go-git/go-git/v5/plumbing/format/packfile"
"github.com/go-git/go-git/v5/plumbing/storer"
+ fixtures "github.com/go-git/go-git-fixtures/v4"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-git-fixtures.v3"
)
type ParserSuite struct {
@@ -106,7 +106,7 @@ func (s *ParserSuite) TestThinPack(c *C) {
w.Close()
// Check that the test object that will come with our thin pack is *not* in the repo
- _, err = fs.Storer.EncodedObject(plumbing.CommitObject, thinpack.Head)
+ _, err = fs.Storer.EncodedObject(plumbing.CommitObject, plumbing.NewHash(thinpack.Head))
c.Assert(err, Equals, plumbing.ErrObjectNotFound)
// Now unpack the thin pack:
@@ -119,7 +119,7 @@ func (s *ParserSuite) TestThinPack(c *C) {
c.Assert(h, Equals, plumbing.NewHash("1288734cbe0b95892e663221d94b95de1f5d7be8"))
// Check that our test object is now accessible
- _, err = fs.Storer.EncodedObject(plumbing.CommitObject, thinpack.Head)
+ _, err = fs.Storer.EncodedObject(plumbing.CommitObject, plumbing.NewHash(thinpack.Head))
c.Assert(err, IsNil)
}
@@ -192,10 +192,6 @@ func (t *testObserver) put(pos int64, o observerObject) {
}
func BenchmarkParse(b *testing.B) {
- if err := fixtures.Init(); err != nil {
- b.Fatal(err)
- }
-
defer func() {
if err := fixtures.Clean(); err != nil {
b.Fatal(err)
@@ -220,10 +216,6 @@ func BenchmarkParse(b *testing.B) {
}
func BenchmarkParseBasic(b *testing.B) {
- if err := fixtures.Init(); err != nil {
- b.Fatal(err)
- }
-
defer func() {
if err := fixtures.Clean(); err != nil {
b.Fatal(err)
diff --git a/plumbing/format/packfile/scanner_test.go b/plumbing/format/packfile/scanner_test.go
index 5c1d5c9..892a27c 100644
--- a/plumbing/format/packfile/scanner_test.go
+++ b/plumbing/format/packfile/scanner_test.go
@@ -4,10 +4,10 @@ import (
"bytes"
"io"
+ fixtures "github.com/go-git/go-git-fixtures/v4"
"github.com/go-git/go-git/v5/plumbing"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-git-fixtures.v3"
)
type ScannerSuite struct {
@@ -93,7 +93,7 @@ func (s *ScannerSuite) TestNextObjectHeaderWithOutReadObject(c *C) {
n, err := p.Checksum()
c.Assert(err, IsNil)
- c.Assert(n, Equals, f.PackfileHash)
+ c.Assert(n.String(), Equals, f.PackfileHash)
}
func (s *ScannerSuite) TestNextObjectHeaderWithOutReadObjectNonSeekable(c *C) {
@@ -115,7 +115,7 @@ func (s *ScannerSuite) TestNextObjectHeaderWithOutReadObjectNonSeekable(c *C) {
n, err := p.Checksum()
c.Assert(err, IsNil)
- c.Assert(n, Equals, f.PackfileHash)
+ c.Assert(n.String(), Equals, f.PackfileHash)
}
func (s *ScannerSuite) TestSeekObjectHeader(c *C) {
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 {
diff --git a/plumbing/revlist/revlist_test.go b/plumbing/revlist/revlist_test.go
index 3b09630..a1ee504 100644
--- a/plumbing/revlist/revlist_test.go
+++ b/plumbing/revlist/revlist_test.go
@@ -9,8 +9,8 @@ import (
"github.com/go-git/go-git/v5/plumbing/storer"
"github.com/go-git/go-git/v5/storage/filesystem"
+ fixtures "github.com/go-git/go-git-fixtures/v4"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-git-fixtures.v3"
)
func Test(t *testing.T) { TestingT(t) }
@@ -51,7 +51,6 @@ const (
// * b029517 Initial commit
func (s *RevListSuite) SetUpTest(c *C) {
- s.Suite.SetUpSuite(c)
sto := filesystem.NewStorage(fixtures.Basic().One().DotGit(), cache.NewObjectLRUDefault())
s.Storer = sto
}
diff --git a/plumbing/transport/file/common_test.go b/plumbing/transport/file/common_test.go
index 99866d7..4d6612b 100644
--- a/plumbing/transport/file/common_test.go
+++ b/plumbing/transport/file/common_test.go
@@ -6,8 +6,8 @@ import (
"os/exec"
"path/filepath"
+ fixtures "github.com/go-git/go-git-fixtures/v4"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-git-fixtures.v3"
)
type CommonSuite struct {
@@ -20,8 +20,6 @@ type CommonSuite struct {
var _ = Suite(&CommonSuite{})
func (s *CommonSuite) SetUpSuite(c *C) {
- s.Suite.SetUpSuite(c)
-
if err := exec.Command("git", "--version").Run(); err != nil {
c.Skip("git command not found")
}
diff --git a/plumbing/transport/file/receive_pack_test.go b/plumbing/transport/file/receive_pack_test.go
index 46a0017..2ee4b86 100644
--- a/plumbing/transport/file/receive_pack_test.go
+++ b/plumbing/transport/file/receive_pack_test.go
@@ -6,7 +6,7 @@ import (
"github.com/go-git/go-git/v5/plumbing/transport/test"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-git-fixtures.v3"
+ "github.com/go-git/go-git-fixtures/v4"
)
type ReceivePackSuite struct {
diff --git a/plumbing/transport/file/server_test.go b/plumbing/transport/file/server_test.go
index 1793c0f..b6ac4e0 100644
--- a/plumbing/transport/file/server_test.go
+++ b/plumbing/transport/file/server_test.go
@@ -4,8 +4,8 @@ import (
"os"
"os/exec"
+ "github.com/go-git/go-git-fixtures/v4"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-git-fixtures.v3"
)
type ServerSuite struct {
diff --git a/plumbing/transport/file/upload_pack_test.go b/plumbing/transport/file/upload_pack_test.go
index 1f210aa..fe7c6af 100644
--- a/plumbing/transport/file/upload_pack_test.go
+++ b/plumbing/transport/file/upload_pack_test.go
@@ -2,13 +2,12 @@ package file
import (
"os"
- "path/filepath"
"github.com/go-git/go-git/v5/plumbing/transport"
"github.com/go-git/go-git/v5/plumbing/transport/test"
+ fixtures "github.com/go-git/go-git-fixtures/v4"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-git-fixtures.v3"
)
type UploadPackSuite struct {
@@ -35,8 +34,7 @@ func (s *UploadPackSuite) SetUpSuite(c *C) {
c.Assert(err, IsNil)
s.EmptyEndpoint = ep
- path = filepath.Join(fixtures.DataFolder, "non-existent")
- ep, err = transport.NewEndpoint(path)
+ ep, err = transport.NewEndpoint("non-existent")
c.Assert(err, IsNil)
s.NonExistentEndpoint = ep
}
diff --git a/plumbing/transport/git/common_test.go b/plumbing/transport/git/common_test.go
index 62eeef9..551b50d 100644
--- a/plumbing/transport/git/common_test.go
+++ b/plumbing/transport/git/common_test.go
@@ -14,7 +14,7 @@ import (
"github.com/go-git/go-git/v5/plumbing/transport"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-git-fixtures.v3"
+ "github.com/go-git/go-git-fixtures/v4"
)
func Test(t *testing.T) { TestingT(t) }
diff --git a/plumbing/transport/git/receive_pack_test.go b/plumbing/transport/git/receive_pack_test.go
index 44989a4..1f730a4 100644
--- a/plumbing/transport/git/receive_pack_test.go
+++ b/plumbing/transport/git/receive_pack_test.go
@@ -4,7 +4,7 @@ import (
"github.com/go-git/go-git/v5/plumbing/transport/test"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-git-fixtures.v3"
+ "github.com/go-git/go-git-fixtures/v4"
)
type ReceivePackSuite struct {
diff --git a/plumbing/transport/git/upload_pack_test.go b/plumbing/transport/git/upload_pack_test.go
index 6d10363..bbfdf58 100644
--- a/plumbing/transport/git/upload_pack_test.go
+++ b/plumbing/transport/git/upload_pack_test.go
@@ -4,7 +4,7 @@ import (
"github.com/go-git/go-git/v5/plumbing/transport/test"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-git-fixtures.v3"
+ "github.com/go-git/go-git-fixtures/v4"
)
type UploadPackSuite struct {
diff --git a/plumbing/transport/http/common_test.go b/plumbing/transport/http/common_test.go
index d413558..5811139 100644
--- a/plumbing/transport/http/common_test.go
+++ b/plumbing/transport/http/common_test.go
@@ -18,7 +18,7 @@ import (
"github.com/go-git/go-git/v5/plumbing/transport"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-git-fixtures.v3"
+ "github.com/go-git/go-git-fixtures/v4"
)
func Test(t *testing.T) { TestingT(t) }
diff --git a/plumbing/transport/http/receive_pack_test.go b/plumbing/transport/http/receive_pack_test.go
index 24eaaba..b977908 100644
--- a/plumbing/transport/http/receive_pack_test.go
+++ b/plumbing/transport/http/receive_pack_test.go
@@ -4,7 +4,7 @@ import (
"github.com/go-git/go-git/v5/plumbing/transport/test"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-git-fixtures.v3"
+ "github.com/go-git/go-git-fixtures/v4"
)
type ReceivePackSuite struct {
diff --git a/plumbing/transport/http/upload_pack_test.go b/plumbing/transport/http/upload_pack_test.go
index 4fc2912..b34441d 100644
--- a/plumbing/transport/http/upload_pack_test.go
+++ b/plumbing/transport/http/upload_pack_test.go
@@ -12,7 +12,7 @@ import (
"github.com/go-git/go-git/v5/plumbing/transport/test"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-git-fixtures.v3"
+ "github.com/go-git/go-git-fixtures/v4"
)
type UploadPackSuite struct {
diff --git a/plumbing/transport/server/server_test.go b/plumbing/transport/server/server_test.go
index ab03ca0..24de099 100644
--- a/plumbing/transport/server/server_test.go
+++ b/plumbing/transport/server/server_test.go
@@ -11,8 +11,8 @@ import (
"github.com/go-git/go-git/v5/storage/filesystem"
"github.com/go-git/go-git/v5/storage/memory"
+ fixtures "github.com/go-git/go-git-fixtures/v4"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-git-fixtures.v3"
)
func Test(t *testing.T) { TestingT(t) }
@@ -28,7 +28,6 @@ type BaseSuite struct {
}
func (s *BaseSuite) SetUpSuite(c *C) {
- s.Suite.SetUpSuite(c)
s.loader = server.MapLoader{}
if s.asClient {
s.client = server.NewClient(s.loader)
diff --git a/plumbing/transport/ssh/upload_pack_test.go b/plumbing/transport/ssh/upload_pack_test.go
index aa7344d..1bcb82b 100644
--- a/plumbing/transport/ssh/upload_pack_test.go
+++ b/plumbing/transport/ssh/upload_pack_test.go
@@ -16,9 +16,9 @@ import (
"github.com/go-git/go-git/v5/plumbing/transport/test"
"github.com/gliderlabs/ssh"
+ fixtures "github.com/go-git/go-git-fixtures/v4"
stdssh "golang.org/x/crypto/ssh"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-git-fixtures.v3"
)
type UploadPackSuite struct {
@@ -32,8 +32,6 @@ type UploadPackSuite struct {
var _ = Suite(&UploadPackSuite{})
func (s *UploadPackSuite) SetUpSuite(c *C) {
- s.Suite.SetUpSuite(c)
-
l, err := net.Listen("tcp", "localhost:0")
c.Assert(err, IsNil)
diff --git a/plumbing/transport/test/receive_pack.go b/plumbing/transport/test/receive_pack.go
index 01972b2..018d38e 100644
--- a/plumbing/transport/test/receive_pack.go
+++ b/plumbing/transport/test/receive_pack.go
@@ -18,8 +18,8 @@ import (
"github.com/go-git/go-git/v5/plumbing/transport"
"github.com/go-git/go-git/v5/storage/memory"
+ fixtures "github.com/go-git/go-git-fixtures/v4"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-git-fixtures.v3"
)
type ReceivePackSuite struct {
@@ -82,7 +82,7 @@ func (s *ReceivePackSuite) TestDefaultBranch(c *C) {
c.Assert(err, IsNil)
ref, ok := info.References["refs/heads/master"]
c.Assert(ok, Equals, true)
- c.Assert(ref, Equals, fixtures.Basic().One().Head)
+ c.Assert(ref.String(), Equals, fixtures.Basic().One().Head)
}
func (s *ReceivePackSuite) TestCapabilities(c *C) {
@@ -101,10 +101,10 @@ func (s *ReceivePackSuite) TestFullSendPackOnEmpty(c *C) {
fixture := fixtures.Basic().ByTag("packfile").One()
req := packp.NewReferenceUpdateRequest()
req.Commands = []*packp.Command{
- {Name: "refs/heads/master", Old: plumbing.ZeroHash, New: fixture.Head},
+ {Name: "refs/heads/master", Old: plumbing.ZeroHash, New: plumbing.NewHash(fixture.Head)},
}
s.receivePack(c, endpoint, req, fixture, full)
- s.checkRemoteHead(c, endpoint, fixture.Head)
+ s.checkRemoteHead(c, endpoint, plumbing.NewHash(fixture.Head))
}
func (s *ReceivePackSuite) TestSendPackWithContext(c *C) {
@@ -112,7 +112,7 @@ func (s *ReceivePackSuite) TestSendPackWithContext(c *C) {
req := packp.NewReferenceUpdateRequest()
req.Packfile = fixture.Packfile()
req.Commands = []*packp.Command{
- {Name: "refs/heads/master", Old: plumbing.ZeroHash, New: fixture.Head},
+ {Name: "refs/heads/master", Old: plumbing.ZeroHash, New: plumbing.NewHash(fixture.Head)},
}
r, err := s.Client.NewReceivePackSession(s.EmptyEndpoint, s.EmptyAuth)
@@ -137,10 +137,10 @@ func (s *ReceivePackSuite) TestSendPackOnEmpty(c *C) {
fixture := fixtures.Basic().ByTag("packfile").One()
req := packp.NewReferenceUpdateRequest()
req.Commands = []*packp.Command{
- {Name: "refs/heads/master", Old: plumbing.ZeroHash, New: fixture.Head},
+ {Name: "refs/heads/master", Old: plumbing.ZeroHash, New: plumbing.NewHash(fixture.Head)},
}
s.receivePack(c, endpoint, req, fixture, full)
- s.checkRemoteHead(c, endpoint, fixture.Head)
+ s.checkRemoteHead(c, endpoint, plumbing.NewHash(fixture.Head))
}
func (s *ReceivePackSuite) TestSendPackOnEmptyWithReportStatus(c *C) {
@@ -149,11 +149,11 @@ func (s *ReceivePackSuite) TestSendPackOnEmptyWithReportStatus(c *C) {
fixture := fixtures.Basic().ByTag("packfile").One()
req := packp.NewReferenceUpdateRequest()
req.Commands = []*packp.Command{
- {Name: "refs/heads/master", Old: plumbing.ZeroHash, New: fixture.Head},
+ {Name: "refs/heads/master", Old: plumbing.ZeroHash, New: plumbing.NewHash(fixture.Head)},
}
req.Capabilities.Set(capability.ReportStatus)
s.receivePack(c, endpoint, req, fixture, full)
- s.checkRemoteHead(c, endpoint, fixture.Head)
+ s.checkRemoteHead(c, endpoint, plumbing.NewHash(fixture.Head))
}
func (s *ReceivePackSuite) TestFullSendPackOnNonEmpty(c *C) {
@@ -162,10 +162,10 @@ func (s *ReceivePackSuite) TestFullSendPackOnNonEmpty(c *C) {
fixture := fixtures.Basic().ByTag("packfile").One()
req := packp.NewReferenceUpdateRequest()
req.Commands = []*packp.Command{
- {Name: "refs/heads/master", Old: fixture.Head, New: fixture.Head},
+ {Name: "refs/heads/master", Old: plumbing.NewHash(fixture.Head), New: plumbing.NewHash(fixture.Head)},
}
s.receivePack(c, endpoint, req, fixture, full)
- s.checkRemoteHead(c, endpoint, fixture.Head)
+ s.checkRemoteHead(c, endpoint, plumbing.NewHash(fixture.Head))
}
func (s *ReceivePackSuite) TestSendPackOnNonEmpty(c *C) {
@@ -174,10 +174,10 @@ func (s *ReceivePackSuite) TestSendPackOnNonEmpty(c *C) {
fixture := fixtures.Basic().ByTag("packfile").One()
req := packp.NewReferenceUpdateRequest()
req.Commands = []*packp.Command{
- {Name: "refs/heads/master", Old: fixture.Head, New: fixture.Head},
+ {Name: "refs/heads/master", Old: plumbing.NewHash(fixture.Head), New: plumbing.NewHash(fixture.Head)},
}
s.receivePack(c, endpoint, req, fixture, full)
- s.checkRemoteHead(c, endpoint, fixture.Head)
+ s.checkRemoteHead(c, endpoint, plumbing.NewHash(fixture.Head))
}
func (s *ReceivePackSuite) TestSendPackOnNonEmptyWithReportStatus(c *C) {
@@ -186,12 +186,12 @@ func (s *ReceivePackSuite) TestSendPackOnNonEmptyWithReportStatus(c *C) {
fixture := fixtures.Basic().ByTag("packfile").One()
req := packp.NewReferenceUpdateRequest()
req.Commands = []*packp.Command{
- {Name: "refs/heads/master", Old: fixture.Head, New: fixture.Head},
+ {Name: "refs/heads/master", Old: plumbing.NewHash(fixture.Head), New: plumbing.NewHash(fixture.Head)},
}
req.Capabilities.Set(capability.ReportStatus)
s.receivePack(c, endpoint, req, fixture, full)
- s.checkRemoteHead(c, endpoint, fixture.Head)
+ s.checkRemoteHead(c, endpoint, plumbing.NewHash(fixture.Head))
}
func (s *ReceivePackSuite) TestSendPackOnNonEmptyWithReportStatusWithError(c *C) {
@@ -200,7 +200,7 @@ func (s *ReceivePackSuite) TestSendPackOnNonEmptyWithReportStatusWithError(c *C)
fixture := fixtures.Basic().ByTag("packfile").One()
req := packp.NewReferenceUpdateRequest()
req.Commands = []*packp.Command{
- {Name: "refs/heads/master", Old: plumbing.ZeroHash, New: fixture.Head},
+ {Name: "refs/heads/master", Old: plumbing.ZeroHash, New: plumbing.NewHash(fixture.Head)},
}
req.Capabilities.Set(capability.ReportStatus)
@@ -212,7 +212,7 @@ func (s *ReceivePackSuite) TestSendPackOnNonEmptyWithReportStatusWithError(c *C)
c.Assert(len(report.CommandStatuses), Equals, 1)
c.Assert(report.CommandStatuses[0].ReferenceName, Equals, plumbing.ReferenceName("refs/heads/master"))
c.Assert(report.CommandStatuses[0].Status, Matches, "(failed to update ref|failed to lock)")
- s.checkRemoteHead(c, endpoint, fixture.Head)
+ s.checkRemoteHead(c, endpoint, plumbing.NewHash(fixture.Head))
}
func (s *ReceivePackSuite) receivePackNoCheck(c *C, ep *transport.Endpoint,
@@ -324,7 +324,7 @@ func (s *ReceivePackSuite) testSendPackAddReference(c *C) {
req := packp.NewReferenceUpdateRequest()
req.Commands = []*packp.Command{
- {Name: "refs/heads/newbranch", Old: plumbing.ZeroHash, New: fixture.Head},
+ {Name: "refs/heads/newbranch", Old: plumbing.ZeroHash, New: plumbing.NewHash(fixture.Head)},
}
if ar.Capabilities.Supports(capability.ReportStatus) {
req.Capabilities.Set(capability.ReportStatus)
@@ -333,7 +333,7 @@ func (s *ReceivePackSuite) testSendPackAddReference(c *C) {
c.Assert(r.Close(), IsNil)
s.receivePack(c, s.Endpoint, req, nil, false)
- s.checkRemoteReference(c, s.Endpoint, "refs/heads/newbranch", fixture.Head)
+ s.checkRemoteReference(c, s.Endpoint, "refs/heads/newbranch", plumbing.NewHash(fixture.Head))
}
func (s *ReceivePackSuite) testSendPackDeleteReference(c *C) {
@@ -347,7 +347,7 @@ func (s *ReceivePackSuite) testSendPackDeleteReference(c *C) {
req := packp.NewReferenceUpdateRequest()
req.Commands = []*packp.Command{
- {Name: "refs/heads/newbranch", Old: fixture.Head, New: plumbing.ZeroHash},
+ {Name: "refs/heads/newbranch", Old: plumbing.NewHash(fixture.Head), New: plumbing.ZeroHash},
}
if ar.Capabilities.Supports(capability.ReportStatus) {
req.Capabilities.Set(capability.ReportStatus)