aboutsummaryrefslogtreecommitdiff
path: root/network/receivepack/hook.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-28 18:16:05 +0000
committerGravatar Runxi Yu2026-03-28 18:16:05 +0000
commite75510d130915c212566865ab070c4294c804eb9 (patch)
treea8d5ff5dd1616264546b8f6f1b1b4672a62084a3 /network/receivepack/hook.go
parentformat/packfile/ingest: Update docs (diff)
signatureNo signature
network/receivepack: Update docs v0.1.124
Diffstat (limited to 'network/receivepack/hook.go')
-rw-r--r--network/receivepack/hook.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/network/receivepack/hook.go b/network/receivepack/hook.go
index a9f36a9e..96027769 100644
--- a/network/receivepack/hook.go
+++ b/network/receivepack/hook.go
@@ -32,8 +32,7 @@ type UpdateDecision struct {
// HookRequest is the input presented to a receive-pack hook before quarantine
// promotion and ref updates.
//
-// Refs, ExistingObjects, QuarantinedObjects, and CommitGraph are borrowed and
-// are only valid for the duration of the hook call.
+// Labels: Life-Call.
type HookRequest struct {
Refs refstore.ReadingStore
ExistingObjects objectstore.ReadingStore
@@ -48,8 +47,7 @@ type HookRequest struct {
//
// The hook runs after pack ingestion into quarantine and before quarantine
// promotion or ref updates. The returned decisions must have the same length as
-// HookRequest.Updates. Hook borrows the data and stores in HookRequest only for
-// the duration of the call.
+// HookRequest.Updates.
type Hook func(context.Context, HookRequest) ([]UpdateDecision, error)
func translateHook(hook Hook) service.Hook {