From 211376cd9a1b4fd5f6ce9fc5dbd41836342073bc Mon Sep 17 00:00:00 2001 From: forgejo-backport-action Date: Sat, 7 Mar 2026 19:02:49 +0100 Subject: [PATCH] [v14.0/forgejo] chore: skip sha256 repo for older git versions (#11551) **Backport:** https://codeberg.org/forgejo/forgejo/pulls/11542 - Breaks testing on git versions that don't have SHA256 support. https://codeberg.org/forgejo-integration/forgejo/actions/runs/16172/jobs/1/attempt/1#jobstep-5-2381 ``` // TestLinksLogin "2026/03/06 06:15:20 ...ices/context/repo.go:1007:28() [E] GetBranchCommit: length 64 has no matched object format: 473a0f4c3be8a93681a267e3b1e9a7dcda1185436fe141f7749120a303721813", ``` Co-authored-by: Gusted Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11551 Reviewed-by: Mathieu Fenniak Co-authored-by: forgejo-backport-action Co-committed-by: forgejo-backport-action --- tests/integration/links_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/integration/links_test.go b/tests/integration/links_test.go index ebc71aa363..611027ff00 100644 --- a/tests/integration/links_test.go +++ b/tests/integration/links_test.go @@ -9,6 +9,7 @@ import ( "path" "testing" + "forgejo.org/modules/git" "forgejo.org/modules/setting" api "forgejo.org/modules/structs" "forgejo.org/modules/test" @@ -161,6 +162,10 @@ func testLinksAsUser(userName string, t *testing.T) { } for _, repo := range apiRepos { + if repo.ObjectFormatName == "sha256" && !git.SupportHashSha256 { + continue + } + for _, link := range repoLinks { req := NewRequest(t, "GET", fmt.Sprintf("/%s/%s%s", userName, repo.Name, link)) session.MakeRequest(t, req, http.StatusOK)