diff options
author | Daniel Martí <mvdan@mvdan.cc> | 2018-03-01 17:09:42 +0000 |
---|---|---|
committer | Daniel Martí <mvdan@mvdan.cc> | 2018-03-01 17:13:07 +0000 |
commit | e850aea5005fdb2a74d7dcd3267dac4a3612df8a (patch) | |
tree | b44c9fc76efffb5482fedd5ab8a72b6b3fce0477 /plumbing/transport/test | |
parent | ede92fa7ff9a6c5a61245e2ebeaa4d3929a37ce8 (diff) | |
download | go-git-e850aea5005fdb2a74d7dcd3267dac4a3612df8a.tar.gz |
all: make the upcoming Go 1.11's vet happy
vet in 1.10 and earlier was buggy in how its "composite literal uses
unkeyed fields" check had false negatives when it encountered a slice of
pointer types that omitted each element's type.
This has been fixed in tip, so adapt to that fix.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Diffstat (limited to 'plumbing/transport/test')
-rw-r--r-- | plumbing/transport/test/receive_pack.go | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/plumbing/transport/test/receive_pack.go b/plumbing/transport/test/receive_pack.go index 0f3352c..a68329e 100644 --- a/plumbing/transport/test/receive_pack.go +++ b/plumbing/transport/test/receive_pack.go @@ -50,7 +50,7 @@ func (s *ReceivePackSuite) TestAdvertisedReferencesNotExists(c *C) { c.Assert(err, IsNil) req := packp.NewReferenceUpdateRequest() req.Commands = []*packp.Command{ - {"master", plumbing.ZeroHash, plumbing.NewHash("6ecf0ef2c2dffb796033e5a02219af86ec6584e5")}, + {Name: "master", Old: plumbing.ZeroHash, New: plumbing.NewHash("6ecf0ef2c2dffb796033e5a02219af86ec6584e5")}, } writer, err := r.ReceivePack(context.Background(), req) @@ -99,7 +99,7 @@ func (s *ReceivePackSuite) TestFullSendPackOnEmpty(c *C) { fixture := fixtures.Basic().ByTag("packfile").One() req := packp.NewReferenceUpdateRequest() req.Commands = []*packp.Command{ - {"refs/heads/master", plumbing.ZeroHash, fixture.Head}, + {Name: "refs/heads/master", Old: plumbing.ZeroHash, New: fixture.Head}, } s.receivePack(c, endpoint, req, fixture, full) s.checkRemoteHead(c, endpoint, fixture.Head) @@ -110,7 +110,7 @@ func (s *ReceivePackSuite) TestSendPackWithContext(c *C) { req := packp.NewReferenceUpdateRequest() req.Packfile = fixture.Packfile() req.Commands = []*packp.Command{ - {"refs/heads/master", plumbing.ZeroHash, fixture.Head}, + {Name: "refs/heads/master", Old: plumbing.ZeroHash, New: fixture.Head}, } r, err := s.Client.NewReceivePackSession(s.EmptyEndpoint, s.EmptyAuth) @@ -135,7 +135,7 @@ func (s *ReceivePackSuite) TestSendPackOnEmpty(c *C) { fixture := fixtures.Basic().ByTag("packfile").One() req := packp.NewReferenceUpdateRequest() req.Commands = []*packp.Command{ - {"refs/heads/master", plumbing.ZeroHash, fixture.Head}, + {Name: "refs/heads/master", Old: plumbing.ZeroHash, New: fixture.Head}, } s.receivePack(c, endpoint, req, fixture, full) s.checkRemoteHead(c, endpoint, fixture.Head) @@ -147,7 +147,7 @@ func (s *ReceivePackSuite) TestSendPackOnEmptyWithReportStatus(c *C) { fixture := fixtures.Basic().ByTag("packfile").One() req := packp.NewReferenceUpdateRequest() req.Commands = []*packp.Command{ - {"refs/heads/master", plumbing.ZeroHash, fixture.Head}, + {Name: "refs/heads/master", Old: plumbing.ZeroHash, New: fixture.Head}, } req.Capabilities.Set(capability.ReportStatus) s.receivePack(c, endpoint, req, fixture, full) @@ -160,7 +160,7 @@ func (s *ReceivePackSuite) TestFullSendPackOnNonEmpty(c *C) { fixture := fixtures.Basic().ByTag("packfile").One() req := packp.NewReferenceUpdateRequest() req.Commands = []*packp.Command{ - {"refs/heads/master", fixture.Head, fixture.Head}, + {Name: "refs/heads/master", Old: fixture.Head, New: fixture.Head}, } s.receivePack(c, endpoint, req, fixture, full) s.checkRemoteHead(c, endpoint, fixture.Head) @@ -172,7 +172,7 @@ func (s *ReceivePackSuite) TestSendPackOnNonEmpty(c *C) { fixture := fixtures.Basic().ByTag("packfile").One() req := packp.NewReferenceUpdateRequest() req.Commands = []*packp.Command{ - {"refs/heads/master", fixture.Head, fixture.Head}, + {Name: "refs/heads/master", Old: fixture.Head, New: fixture.Head}, } s.receivePack(c, endpoint, req, fixture, full) s.checkRemoteHead(c, endpoint, fixture.Head) @@ -184,7 +184,7 @@ func (s *ReceivePackSuite) TestSendPackOnNonEmptyWithReportStatus(c *C) { fixture := fixtures.Basic().ByTag("packfile").One() req := packp.NewReferenceUpdateRequest() req.Commands = []*packp.Command{ - {"refs/heads/master", fixture.Head, fixture.Head}, + {Name: "refs/heads/master", Old: fixture.Head, New: fixture.Head}, } req.Capabilities.Set(capability.ReportStatus) @@ -198,7 +198,7 @@ func (s *ReceivePackSuite) TestSendPackOnNonEmptyWithReportStatusWithError(c *C) fixture := fixtures.Basic().ByTag("packfile").One() req := packp.NewReferenceUpdateRequest() req.Commands = []*packp.Command{ - {"refs/heads/master", plumbing.ZeroHash, fixture.Head}, + {Name: "refs/heads/master", Old: plumbing.ZeroHash, New: fixture.Head}, } req.Capabilities.Set(capability.ReportStatus) @@ -306,7 +306,7 @@ func (s *ReceivePackSuite) testSendPackAddReference(c *C) { req := packp.NewReferenceUpdateRequest() req.Commands = []*packp.Command{ - {"refs/heads/newbranch", plumbing.ZeroHash, fixture.Head}, + {Name: "refs/heads/newbranch", Old: plumbing.ZeroHash, New: fixture.Head}, } if ar.Capabilities.Supports(capability.ReportStatus) { req.Capabilities.Set(capability.ReportStatus) @@ -329,7 +329,7 @@ func (s *ReceivePackSuite) testSendPackDeleteReference(c *C) { req := packp.NewReferenceUpdateRequest() req.Commands = []*packp.Command{ - {"refs/heads/newbranch", fixture.Head, plumbing.ZeroHash}, + {Name: "refs/heads/newbranch", Old: fixture.Head, New: plumbing.ZeroHash}, } if ar.Capabilities.Supports(capability.ReportStatus) { req.Capabilities.Set(capability.ReportStatus) |