Documentation ¶
Index ¶
Constants ¶
View Source
const ( CtrlR = "ctrl+r" CtrlS = "ctrl+s" CtrlC = "ctrl+c" Enter = "enter" )
Keys
Variables ¶
View Source
var (
ErrCancelled = errors.New("cancelled")
)
App errors
Functions ¶
func GetSubtreePath ¶
func GetSubtreePath() string
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (App) GetWorktrees ¶
GetWorktrees returns the worktree list for the repo of which cwd is part of
func (App) ParseCommandOutput ¶
ParseCommandOutput parses the "git worktree list --porcelain" command output and returns a list of Worktree
type ItemDelegate ¶
type ItemDelegate struct{}
func (ItemDelegate) Spacing ¶
func (ItemDelegate) Spacing() int
Spacing implements list.ItemDelegate
type Model ¶
type Model struct { // Selected worktree Selected Worktree // App state AppState *AppState // List of worktrees WorktreeList list.Model }
type Worktree ¶
type Worktree struct { // Absolute path of the git worktree directory RootPath string // Relative path of RootPath with respect // to the current working directory RootPathRelative string // Absolute path of the directory which can be reached // from appending the path of current directory relative // to the top-level directory to the RootPath. This path // may or may not exist. // Eg. // CWD = $BRANCH-1/a/b/c // Here, // subtree is a/b/c // ValidSubtreePath would be <current_worktree_root>/a/b/c // if it exist ValidSubtreePath string // Relative path of ValidSubtreePath with respect // to the current working directory ValidSubtreePathRelative string // Worktree branch Branch string // Head Head string // Reason for lock Reason string // Whether the worktree is locked Locked bool // Whether the head is detached Detached bool // Whether the worktree can be pruned Prunable bool // Whether the repo is a bare repo Bare bool // contains filtered or unexported fields }
Worktree defines a git worktree
func (Worktree) FilterValue ¶
Click to show internal directories.
Click to hide internal directories.