diff options
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) |
