From 13507b7704415332e2b00f5f4d291f3be8bd18fa Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 22 Mar 2026 23:51:01 +0000 Subject: receivepack: Lifecycle/ownership docs --- receivepack/options.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'receivepack/options.go') diff --git a/receivepack/options.go b/receivepack/options.go index 7328f770..860f29c1 100644 --- a/receivepack/options.go +++ b/receivepack/options.go @@ -9,6 +9,12 @@ import ( ) // Options configures one receive-pack invocation. +// +// ReceivePack borrows all configured dependencies. +// +// Refs and ExistingObjects are required and must be non-nil. +// ObjectsRoot is required if the invocation may need to ingest or promote a +// pack. type Options struct { // GitProtocol is the raw Git protocol version string from the transport, // such as "version=1". @@ -27,7 +33,8 @@ type Options struct { // directories moved from quarantine into the permanent object store. PromotedObjectPermissions *PromotedObjectPermissions // Hook, when non-nil, runs after pack ingestion into quarantine and before - // quarantine promotion or ref updates. + // quarantine promotion or ref updates. Hook is borrowed for the duration of + // ReceivePack. Hook Hook // Agent is the receive-pack agent string advertised via capability. // -- cgit v1.3.1-10-gc9f91