diff options
| author | 2026-03-07 21:05:30 +0800 | |
|---|---|---|
| committer | 2026-03-07 21:16:17 +0800 | |
| commit | 446993c94dc34c0374e00f3f5f21ece72b18a9f6 (patch) | |
| tree | aeaba0879b711c58e122c81893df97e5a64b0233 /receivepack/options.go | |
| parent | receivepack: Propagate the rename error properly (diff) | |
receivepack: Set permissions properly
Diffstat (limited to 'receivepack/options.go')
| -rw-r--r-- | receivepack/options.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/receivepack/options.go b/receivepack/options.go index 7763854a..76b908fd 100644 --- a/receivepack/options.go +++ b/receivepack/options.go @@ -1,6 +1,7 @@ package receivepack import ( + "io/fs" "os" "codeberg.org/lindenii/furgit/objectid" @@ -8,6 +9,13 @@ import ( "codeberg.org/lindenii/furgit/refstore" ) +// PromotedObjectPermissions configures the destination permissions applied to +// objects and directories promoted out of quarantine. +type PromotedObjectPermissions struct { + DirMode fs.FileMode + FileMode fs.FileMode +} + // Options configures one receive-pack invocation. type Options struct { // GitProtocol is the raw Git protocol version string from the transport, @@ -23,6 +31,9 @@ type Options struct { // ObjectsRoot is the permanent object storage root beneath which per-push // quarantine directories are derived. ObjectsRoot *os.Root + // PromotedObjectPermissions, when non-nil, is applied to objects and + // directories moved from quarantine into the permanent object store. + PromotedObjectPermissions *PromotedObjectPermissions // TODO: Hook and policy callbacks. } |
