shithub: furgit

Download patch

ref: 3d98cec9e2d8b93517e38f46410d28d0b6308d3e
parent: 6804ac401d8e33d91fb6ffa4bc88faaa034c0279
author: Runxi Yu <me@runxiyu.org>
date: Wed Mar 4 09:12:44 EST 2026

refstore/packed: Make more tests iterate algorithms

--- a/refstore/packed/packed_test.go
+++ b/refstore/packed/packed_test.go
@@ -282,10 +282,12 @@
 		t.Fatalf("packed.New invalid algorithm error = %v", err)
 	}
 
-	_, err = packed.New(root, objectid.AlgorithmSHA256)
-	if !errors.Is(err, os.ErrNotExist) {
-		t.Fatalf("packed.New missing packed-refs error = %v", err)
-	}
+	testgit.ForEachAlgorithm(t, func(t *testing.T, algo objectid.Algorithm) { //nolint:thelper
+		_, err = packed.New(root, algo)
+		if !errors.Is(err, os.ErrNotExist) {
+			t.Fatalf("packed.New missing packed-refs error = %v", err)
+		}
+	})
 }
 
 func refNames(refs []ref.Ref) []string {
--