Documentation
¶
Index ¶
- func BuildWorktreeList(worktrees []*Worktree, withIndexes bool, replaceHome string) (list string)
- func Clone(url string, args ...string) error
- func Command(args ...string) error
- func CommandOutput(args ...string) (out strings.Builder, err error)
- func GetConfig(key string, args ...string) (out strings.Builder, err error)
- func NewWorktree(branch string) error
- func Refs(refs string) (heads string, err error)
- func SetBare(bare bool) error
- func SetConfig(key string, value string, args ...string) (err error)
- type Worktree
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildWorktreeList ¶
BuildWorktreeList formats a tabulated worktree list, with emojis and optional indexes
func Command ¶
Command executes the specified git command. Stdout and Stderr are redirected to os.Stdout and os.Stderr.
func CommandOutput ¶
CommandOutput executes the specified git command and returns its output. Stderr is redirected to os.Stderr.
Types ¶
type Worktree ¶
type Worktree struct { Path string Branch string Head string Bare bool Detached bool Locked bool LockedReason string }
Worktree represents a Git worktree with its attributes.
func GitWorktreeList ¶
GitWorktreeList runs `git worktree list --porcelain -z` and parses the output.
func ParseWorktrees ¶
ParseWorktrees parses the output of `git worktree list --porcelain -z` into Worktree structs.
Click to show internal directories.
Click to hide internal directories.