diff options
| author | 2026-03-28 18:16:05 +0000 | |
|---|---|---|
| committer | 2026-03-28 18:16:05 +0000 | |
| commit | e75510d130915c212566865ab070c4294c804eb9 (patch) | |
| tree | a8d5ff5dd1616264546b8f6f1b1b4672a62084a3 /network/receivepack/service/hook.go | |
| parent | format/packfile/ingest: Update docs (diff) | |
| signature | No signature | |
network/receivepack: Update docs v0.1.124
Diffstat (limited to 'network/receivepack/service/hook.go')
| -rw-r--r-- | network/receivepack/service/hook.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/network/receivepack/service/hook.go b/network/receivepack/service/hook.go index e3afa375..66ff0929 100644 --- a/network/receivepack/service/hook.go +++ b/network/receivepack/service/hook.go @@ -26,10 +26,9 @@ type UpdateDecision struct { Message string } -// HookRequest is the borrowed view passed to one Hook invocation. +// HookRequest is the view passed to one Hook invocation. // -// 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 @@ -42,6 +41,5 @@ type HookRequest struct { // Hook is an optional per-request validation hook. // -// Hook borrows the data and stores in HookRequest only for the duration of the -// call. +// The returned decisions must have the same length as HookRequest.Updates. type Hook func(context.Context, HookRequest) ([]UpdateDecision, error) |
