1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-08-05 01:45:22 +02:00

chore: fix tests for old git versions (#8144)

Ref: forgejo/forgejo#8140
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8144
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
This commit is contained in:
Gusted 2025-06-11 09:38:15 +02:00 committed by Earl Warren
parent 4288c214a4
commit 7958942e3e
2 changed files with 8 additions and 0 deletions

View file

@ -27,6 +27,10 @@ import (
func forEachObjectFormat(t *testing.T, f func(t *testing.T, objectFormat git.ObjectFormat)) {
for _, objectFormat := range []git.ObjectFormat{git.Sha256ObjectFormat, git.Sha1ObjectFormat} {
if !git.SupportHashSha256 && objectFormat == git.Sha256ObjectFormat {
continue
}
t.Run(objectFormat.Name(), func(t *testing.T) {
f(t, objectFormat)
})