File: fix-ftbfs.patch

package info (click to toggle)
golang-github-go-git-go-git 5.16.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,684 kB
  • sloc: makefile: 81; sh: 76
file content (23 lines) | stat: -rw-r--r-- 1,313 bytes parent folder | download
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))
 }