Documentation
¶
Overview ¶
Package workspace provides workspace management functionality for CM.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Worktree errors. ErrWorktreeExists = errors.New("worktree already exists") ErrWorktreeNotInStatus = errors.New("worktree not found in status") ErrRepositoryNotClean = errors.New("repository is not clean") ErrDirectoryExists = errors.New("directory already exists") // User interaction errors. ErrDeletionCancelled = errors.New("deletion cancelled by user") )
Error definitions for workspace package.
Functions ¶
This section is empty.
Types ¶
type CreateWorktreeOpts ¶
CreateWorktreeOpts contains optional parameters for worktree creation in workspace mode.
type NewWorkspaceParams ¶
type NewWorkspaceParams struct { FS fs.FS Git git.Git Config config.Config StatusManager status.Manager Logger logger.Logger Prompt prompt.Prompter WorktreeProvider WorktreeProvider HookManager hooks.HookManagerInterface }
NewWorkspaceParams contains parameters for creating a new Workspace instance.
type Workspace ¶
type Workspace interface { Validate() error CreateWorktree(branch string, opts ...CreateWorktreeOpts) (string, error) DeleteWorktree(branch string, force bool) error DeleteAllWorktrees(force bool) error ListWorktrees() ([]status.WorktreeInfo, error) SetLogger(logger logger.Logger) Load() error ParseFile(filename string) (Config, error) GetName(config Config, filename string) string ValidateWorkspaceReferences() error }
Workspace interface provides workspace management capabilities.
func NewWorkspace ¶
func NewWorkspace(params NewWorkspaceParams) Workspace
NewWorkspace creates a new Workspace instance.
type WorktreeInfo ¶
type WorktreeInfo struct { Repository string // Repository URL Branch string // Branch name Remote string // Remote name WorktreePath string // Path to worktree directory WorkspaceFile string // Path to worktree-specific workspace file Issue *status.WorktreeInfo // Original worktree info including issue }
WorktreeInfo represents comprehensive worktree information for workspace operations.
type WorktreeProvider ¶
type WorktreeProvider func(params worktree.NewWorktreeParams) worktree.Worktree
WorktreeProvider is a function type that creates worktree instances.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.