Documentation
¶
Index ¶
Constants ¶
View Source
const ( ConfigFileName = ".wtp.yml" CurrentVersion = "1.0" DefaultBaseDir = "../worktrees" HookTypeCopy = "copy" HookTypeCommand = "command" )
Variables ¶
This section is empty.
Functions ¶
func SaveConfig ¶
SaveConfig saves configuration to .git-worktree-plus.yml in the repository root
Types ¶
type Config ¶
type Config struct {
Version string `yaml:"version"`
Defaults Defaults `yaml:"defaults,omitempty"`
Hooks Hooks `yaml:"hooks,omitempty"`
}
Config represents the wtp configuration
func LoadConfig ¶
LoadConfig loads configuration from .wtp.yml in the repository root
func (*Config) ResolveWorktreePath ¶
ResolveWorktreePath resolves the full path for a worktree given a name
type Defaults ¶
type Defaults struct {
BaseDir string `yaml:"base_dir,omitempty"`
}
Defaults represents default configuration values
type Hook ¶
type Hook struct {
Type string `yaml:"type"` // "copy" or "command"
From string `yaml:"from,omitempty"`
To string `yaml:"to,omitempty"`
Command string `yaml:"command,omitempty"`
Env map[string]string `yaml:"env,omitempty"`
WorkDir string `yaml:"work_dir,omitempty"`
}
Hook represents a single hook configuration
Click to show internal directories.
Click to hide internal directories.