aboutsummaryrefslogtreecommitdiff
path: root/network/receivepack/service
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-30 19:53:06 +0000
committerGravatar Runxi Yu2026-03-30 19:57:38 +0000
commit82f8ae0392250f0de127fcd7a5da21587e9e589c (patch)
treedb4a5c37ed310273a0491755833b0c206312d53e /network/receivepack/service
parentnetwork/receivepack: Use dual (diff)
signatureNo signature
network/receivepack: Cleanup; also document QuarantinedObjects nullness
Diffstat (limited to 'network/receivepack/service')
-rw-r--r--network/receivepack/service/hook.go7
-rw-r--r--network/receivepack/service/options.go4
-rw-r--r--network/receivepack/service/service_test.go2
3 files changed, 6 insertions, 7 deletions
diff --git a/network/receivepack/service/hook.go b/network/receivepack/service/hook.go
index 6f472661..68dc5051 100644
--- a/network/receivepack/service/hook.go
+++ b/network/receivepack/service/hook.go
@@ -30,8 +30,11 @@ type UpdateDecision struct {
//
// Labels: Life-Call.
type HookRequest struct {
- Refs refstore.ReadingStore
- ExistingObjects objectstore.Reader
+ Refs refstore.ReadingStore
+ ExistingObjects objectstore.Reader
+ // QuarantinedObjects exposes quarantined objects for this push.
+ //
+ // When the push did not create a quarantine, QuarantinedObjects is nil.
QuarantinedObjects objectstore.Reader
CommitGraph *commitgraphread.Reader
Updates []RefUpdate
diff --git a/network/receivepack/service/options.go b/network/receivepack/service/options.go
index 9e790bc0..e183b709 100644
--- a/network/receivepack/service/options.go
+++ b/network/receivepack/service/options.go
@@ -3,7 +3,6 @@ package service
import (
"codeberg.org/lindenii/furgit/common/iowrap"
commitgraphread "codeberg.org/lindenii/furgit/format/commitgraph/read"
- objectid "codeberg.org/lindenii/furgit/object/id"
objectstore "codeberg.org/lindenii/furgit/object/store"
refstore "codeberg.org/lindenii/furgit/ref/store"
)
@@ -18,8 +17,7 @@ import (
// CommitGraph, Progress, Hook, and HookIO are optional; when provided they are also
// borrowed for the duration of Execute.
type Options struct {
- Algorithm objectid.Algorithm
- Refs interface {
+ Refs interface {
refstore.ReadingStore
refstore.TransactionalStore
refstore.BatchStore
diff --git a/network/receivepack/service/service_test.go b/network/receivepack/service/service_test.go
index 50d02beb..94e105da 100644
--- a/network/receivepack/service/service_test.go
+++ b/network/receivepack/service/service_test.go
@@ -25,7 +25,6 @@ func TestExecutePackExpectedWithoutObjectIngress(t *testing.T) {
store := memory.New(algo)
svc := service.New(service.Options{
- Algorithm: algo,
ExistingObjects: store,
})
@@ -59,7 +58,6 @@ func TestExecuteDiscardedQuarantineAfterIngestFailure(t *testing.T) {
objectIngress := newDualIngress(t, algo)
svc := service.New(service.Options{
- Algorithm: algo,
ExistingObjects: store,
ObjectIngress: objectIngress,
})