Documentation
¶
Overview ¶
Package worktreepolicy owns the pure worktree configuration format and validation. Reading a user or repository policy remains the responsibility of the caller.
Index ¶
Constants ¶
View Source
const ( Version = 1 MaxConfigSize = 64 << 10 StoreModeCentral = "central" StoreModeRepositoryLocal = "repository-local" )
Variables ¶
This section is empty.
Functions ¶
func RepositoryPlacementPolicy ¶
RepositoryPlacementPolicy rejects machine-local settings in a tracked policy.
func ValidateRetiredArchiveRepositoryName ¶
ValidateRetiredArchiveRepositoryName preserves the repository-basename grammar used by the worktrees facade, including a leading dot.
Types ¶
type BranchValidator ¶
BranchValidator checks the complete candidate ref, including the probe suffix. The caller supplies its existing Git branch grammar implementation.
type Config ¶
type Config struct {
Version int `yaml:"version"`
Worktrees struct {
BranchPrefix *string `yaml:"branch_prefix"`
// Store and Root are machine-local user policy, never repository policy.
Store *string `yaml:"store"`
Root *string `yaml:"root"`
} `yaml:"worktrees"`
// Retirement is machine-local user policy. A source repository cannot
// choose where a developer exports private Work Log evidence.
Retirement struct {
ArchiveRepository *string `yaml:"archive_repository"`
Organizations map[string]RetiredArchiveOrganizationConfig `yaml:"organizations"`
} `yaml:"retirement"`
}
Config is layered user then repository. A nil prefix leaves the lower layer intact; an explicitly empty value deliberately disables it.
type RetiredArchiveOrganizationConfig ¶
type RetiredArchiveOrganizationConfig struct {
ArchiveRepository *string `yaml:"archive_repository"`
}
Click to show internal directories.
Click to hide internal directories.