ref: ab174c473618dd3743881cf44e02c2db4d1ecd5f
parent: 5942e587cdc1bf17211be5c2b8038662ce348402
author: Runxi Yu <runxiyu@umich.edu>
date: Mon Mar 30 17:05:59 EDT 2026
*: Fix lints
--- a/network/receivepack/service/execute.go
+++ b/network/receivepack/service/execute.go
@@ -15,6 +15,7 @@
result := &Result{Commands: make([]CommandResult, 0, len(req.Commands)),
}
+
var err error
quarantine, ok := service.ingestQuarantine(result, req.Commands, req)
@@ -88,7 +89,6 @@
return result, nil
}
- quarantine = nil
utils.BestEffortFprintf(service.opts.Progress, "promoting quarantine: done.\n")
}
--- a/object/store/dual/dual_test.go
+++ b/object/store/dual/dual_test.go
@@ -76,6 +76,7 @@
t.Helper()
meta := fixtureMetadata(t, algo)
+
hex, ok := meta[key]
if !ok { t.Fatalf("missing fixture metadata key %q", key)@@ -93,6 +94,7 @@
t.Helper()
objectsRoot := repo.OpenObjectsRoot(t)
+
looseStore, err := loose.New(objectsRoot, algo)
if err != nil { t.Fatalf("loose.New: %v", err)@@ -99,6 +101,7 @@
}
packRoot := repo.OpenPackRoot(t)
+
packedStore, err := packed.New(packRoot, algo, packed.Options{WriteRev: true}) if err != nil { t.Fatalf("packed.New: %v", err)@@ -110,7 +113,7 @@
func TestDualReadsWritesAndQuarantine(t *testing.T) {t.Parallel()
- testgit.ForEachAlgorithm(t, func(t *testing.T, algo objectid.Algorithm) {+ testgit.ForEachAlgorithm(t, func(t *testing.T, algo objectid.Algorithm) { //nolint:thelperhead := fixtureOID(t, algo, "head")
packBytes := fixtureBytes(t, algo, "nonthin.pack")
@@ -138,6 +141,7 @@
}
looseContent := []byte("dual quarantine loose object\n")+
looseID, err := objectQ.WriteBytesContent(objecttype.TypeBlob, looseContent)
if err != nil { t.Fatalf("quarantine.WriteBytesContent: %v", err)@@ -212,7 +216,7 @@
func TestDualQuarantineDiscardDropsBothHalves(t *testing.T) {t.Parallel()
- testgit.ForEachAlgorithm(t, func(t *testing.T, algo objectid.Algorithm) {+ testgit.ForEachAlgorithm(t, func(t *testing.T, algo objectid.Algorithm) { //nolint:thelperhead := fixtureOID(t, algo, "head")
packBytes := fixtureBytes(t, algo, "nonthin.pack")
@@ -219,7 +223,11 @@
repo := testgit.NewRepo(t, testgit.RepoOptions{ObjectFormat: algo, Bare: true})store := newDualStore(t, repo, algo)
- quarantiner := any(store).(objectstore.Quarantiner)
+ quarantiner, ok := any(store).(objectstore.Quarantiner)
+ if !ok {+ t.Fatal("expected objectstore.Quarantiner")+ }
+
quarantine, err := quarantiner.BeginQuarantine(objectstore.QuarantineOptions{}) if err != nil { t.Fatalf("BeginQuarantine: %v", err)--- a/object/store/quarantine.go
+++ b/object/store/quarantine.go
@@ -1,6 +1,6 @@
package objectstore
-// WriterQuarantine represents one quarantined write that accepts both object-
+// Quarantine represents one quarantined write that accepts both object-
// wise and pack-wise writes.
type Quarantine interface {BaseQuarantine
@@ -13,7 +13,7 @@
Pack PackQuarantineOptions
}
-// WriterQuarantiner creates coordinated quarantines that support both object-
+// Quarantiner creates coordinated quarantines that support both object-
// wise and pack-wise writes.
type Quarantiner interface {BeginQuarantine(opts QuarantineOptions) (Quarantine, error)
--
⑨