Documentation
¶
Overview ¶
Package vcs defines a version control system abstraction layer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface {
Type() Type
// RepoDir returns the root directory of the repository.
RepoDir() string
// Branch operations
BranchExists(branchName string) bool
GetCurrentBranch() (string, error)
GetDefaultBranch() (string, error)
DeleteBranch(branchName string, force bool) error
MergeBranch(branchName string) error
// Worktree operations
WorktreePath(opts WorktreePathOptions) string
CreateWorktree(worktreePath, branchName string) error
ListWorktrees() ([]Worktree, error)
RemoveWorktree(worktreePath string, force bool) error
GetWorktreeForBranch(branchName string) (string, error)
PruneWorktrees() error
}
Backend abstracts version control operations scoped to a repository.
Click to show internal directories.
Click to hide internal directories.