1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
Forwarded: https://github.com/go-git/go-git/issues/1681
Last-Update: 2025-10-05
From: Simon Josefsson <simon@josefsson.org>
Subject: Fix FTBFS
diff --git a/plumbing/transport/test/receive_pack.go b/plumbing/transport/test/receive_pack.go
index d4d2b107..08132d39 100644
--- a/plumbing/transport/test/receive_pack.go
+++ b/plumbing/transport/test/receive_pack.go
@@ -206,11 +206,11 @@ func (s *ReceivePackSuite) TestSendPackOnNonEmptyWithReportStatusWithError(c *C)
report, err := s.receivePackNoCheck(c, endpoint, req, fixture, full)
//XXX: Recent git versions return "failed to update ref", while older
// (>=1.9) return "failed to lock".
- c.Assert(err, ErrorMatches, ".*(failed to update ref|failed to lock).*")
+ c.Assert(err, ErrorMatches, ".*(failed to update ref|failed to lock|reference already exists).*")
c.Assert(report.UnpackStatus, Equals, "ok")
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)")
+ c.Assert(report.CommandStatuses[0].Status, Matches, "(failed to update ref|failed to lock|reference already exists)")
s.checkRemoteHead(c, endpoint, plumbing.NewHash(fixture.Head))
}
|