Versions in this module Expand all Collapse all v0 v0.3.0 Nov 14, 2026 Changes in this version + const MaxConflictBytes + const MaxHistoryMove + const MaxPatchFiles + const MaxRecoveryBytes + const OpKindApplyPatch + const OpKindBranchDelete + const OpKindDeleteUntracked + const OpKindDiscard + const OpKindResolveConflict + const OpKindStashClear + const OpKindStashDrop + const OpStatusFailed + const OpStatusInterrupted + const OpStatusPending + const OpStatusSucceeded + func BuildConflictResult(segs []ConflictSegment, choices []HunkChoice) string + func HasConflictMarkers(text string) bool + func MovedLines(hunks []Hunk) map[[2]int]MovedLine + func PatchLinesFor(src []PatchSourceLine, hunks []Hunk, picks map[[2]int]bool) ([]int, error) + type AmendBackend interface + AmendTo func(ctx context.Context, root, commit string) error + type Backend interface + Name func() string + type BranchBackend interface + ListBranches func(ctx context.Context, root string) ([]Branch, error) + type CherryPickBackend interface + CherryPickCommits func(ctx context.Context, root string, hashes []string) error + type CommandEntry struct + Args []string + Class OpClass + Duration time.Duration + ExitCode int + Failure ErrClass + Root string + Seq uint64 + Time int64 + func (e CommandEntry) Created() time.Time + func (e CommandEntry) Failed() bool + func (e CommandEntry) Line() string + type CommandLog struct + func NewCommandLog() *CommandLog + func (l *CommandLog) Clear(root string) + func (l *CommandLog) Entries(root string, withReads bool) []CommandEntry + func (l *CommandLog) Record(e CommandEntry) type CommitDraft + CoAuthors []string + ResetAuthor bool + type CommitFilter struct + CurrentBranchOnly bool + Hidden []string + Limit int + Path string + Since string + Until string + func (f CommitFilter) Active() bool + type ConflictHunk struct + Base string + Ours string + Theirs string + type ConflictSegment struct + Hunk *ConflictHunk + Text string + func ParseConflictMarkers(merged string) ([]ConflictSegment, error) + type ConflictSides struct + Base string + Editable bool + Ours string + Path string + Reason string + Segments []ConflictSegment + Theirs string + type CourierFile struct + Added int + Path string + Removed int + type CourierPreview struct + Clean bool + Files []CourierFile + Problem string + type CourierSource struct + Commit string + Hunks []Hunk + OldPath string + Path string + Picks map[[2]int]bool type ErrClass + func ClassifyStderr(stderr string) ErrClass type Error + func NewError(class ErrClass, op OpClass, sub string, exitCode int, stderr string, ...) *Error + type HistoryAction string + const HistoryDrop + const HistoryFixup + const HistoryMove + const HistoryReword + const HistorySquash + type HistoryBackend interface + RewriteHistory func(ctx context.Context, root string, op HistoryOp) error + type HistoryChange string + const ChangeAbsorbs + const ChangeDropped + const ChangeFixedUp + const ChangeMoved + const ChangeNone + const ChangeReworded + const ChangeSquashed + type HistoryOp struct + Action HistoryAction + Hashes []string + Message string + Offset int + type HistoryPreview struct + Above int + Rows []HistoryPreviewRow + func PreviewHistory(commits []CommitInfo, op HistoryOp) (HistoryPreview, error) + type HistoryPreviewRow struct + Absorbed int + Change HistoryChange + Hash string + Into string + Removed bool + Short string + Subject string + type HunkChoice int + const ChoiceBase + const ChoiceBoth + const ChoiceNone + const ChoiceOurs + const ChoiceTheirs + type IgnoreScope string + const IgnoreInRepository + const IgnoreLocally + type MovedLine struct + Other int + Removed bool + type Operation struct + After string + CreatedAt int64 + Error string + FinishedAt int64 + ID string + Kind string + Name string + Paths []string + Removed []string + Snapshot string + Status string + UndoneAt int64 + Version int + func (o Operation) CanUndo() bool + func (o Operation) Created() time.Time + type PatchAction string + const PatchMove + const PatchRemove + const PatchSplit + const PatchUndo + type PatchBackend interface + PatchSource func(ctx context.Context, root, commit, path, previousPath string) ([]PatchSourceLine, error) + RewriteWithPatch func(ctx context.Context, root string, op PatchOp) error + type PatchFile struct + Lines []int + Path string + PreviousPath string + Whole bool + type PatchOp struct + Action PatchAction + Commit string + Dest string + Files []PatchFile + Message string + type PatchSourceLine struct + Index int + Selectable bool + Text string type RebaseStep + func PlanAutosquash(plan []RebaseCommit) (steps []RebaseStep, moved int) + type ReplayKind string + const ReplayCheckout + const ReplayCommit + const ReplayRebase + type ReplayPlan struct + Description string + From string + Identity string + Kind ReplayKind + Redo bool + To string type Runner + Backend Backend + Commands *CommandLog + Journal bool + func (r *Runner) AmendTo(ctx context.Context, root, commit string) error + func (r *Runner) CherryPickCommits(ctx context.Context, root string, hashes []string) error + func (r *Runner) CompareCommits(ctx context.Context, root, base, hash string) (*ChangesSnapshot, error) + func (r *Runner) CourierPatch(ctx context.Context, root string, srcs ...CourierSource) (string, error) + func (r *Runner) CreateFixup(ctx context.Context, root, hash string) error + func (r *Runner) DeliverCourier(ctx context.Context, dest, patch string) error + func (r *Runner) DiscardCourierLines(ctx context.Context, root string, src CourierSource) error + func (r *Runner) FilterCommits(ctx context.Context, root string, f CommitFilter) ([]CommitInfo, error) + func (r *Runner) IgnorePaths(ctx context.Context, root string, paths []string, scope IgnoreScope) (int, error) + func (r *Runner) Operations(ctx context.Context, root string) ([]Operation, error) + func (r *Runner) PatchSource(ctx context.Context, root, commit, path, previousPath string) ([]PatchSourceLine, error) + func (r *Runner) PlanReplay(ctx context.Context, root string, redo bool) (plan ReplayPlan, ok bool, err error) + func (r *Runner) PreviewCourier(ctx context.Context, dest, patch string) (CourierPreview, error) + func (r *Runner) PublishedCommits(ctx context.Context, root string, hashes []string) ([]string, error) + func (r *Runner) ReadConflict(ctx context.Context, root, rel string) (ConflictSides, error) + func (r *Runner) RebaseOntoFrom(ctx context.Context, root, target, upstream string) error + func (r *Runner) Replay(ctx context.Context, root string, redo bool, expected string) error + func (r *Runner) ResolveWith(ctx context.Context, root, rel, content string) error + func (r *Runner) RewriteHistory(ctx context.Context, root string, op HistoryOp) error + func (r *Runner) RewriteWithPatch(ctx context.Context, root string, op PatchOp) error + func (r *Runner) SquashFixups(ctx context.Context, root, hash string) (int, error) + func (r *Runner) StashLines(ctx context.Context, root string, src CourierSource, message string) error + func (r *Runner) StashPushMode(ctx context.Context, root string, mode StashMode, message string) error + func (r *Runner) UndoOperation(ctx context.Context, root, id string) error + type StashBackend interface + StashList func(ctx context.Context, root string) ([]Stash, error) + type StashMode string + const StashKeepIndex + const StashStaged + type TagBackend interface + ListTags func(ctx context.Context, root string) ([]Tag, error) + type WorktreeBackend interface + ListWorktrees func(ctx context.Context, root string) ([]Worktree, error) + type WriteBackend interface + CreateBranch func(ctx context.Context, root, name, base string) error + CreateTag func(ctx context.Context, root, name, ref string) error + DeleteBranch func(ctx context.Context, root, name string) error + DeleteTag func(ctx context.Context, root, name string) error + RenameBranch func(ctx context.Context, root, name, to string) error + StashApply func(ctx context.Context, root string, index int) error + StashDrop func(ctx context.Context, root string, index int) error + StashPop func(ctx context.Context, root string, index int) error + StashPush func(ctx context.Context, root, message string) error + SwitchBranch func(ctx context.Context, root, name string) error v0.2.0 Nov 8, 2026 Changes in this version + const AutostashMessage + const LargeDiffLines + const MaxBlameLines + const MaxCommitPromptBytes + const MaxContextWindowBytes + const MaxGraphLimit + const MaxOnDemandPatchBytes + const MaxPatchBytesPerFile + const MaxPatchFileBytes + const MaxPushRefs + const MaxReadOutput + const MaxRebaseCommits + const MaxReflogEntries + const MaxSnapshotBytes + const MaxUntrackedFiles + const MaxWordDiffProduct + const MaxWordDiffRewriteRatio + const MaxWordDiffRunes + const MutateTimeout + const NetworkTimeout + const OnDemandTimeout + const ReadTimeout + const RefHeadsPrefix + const RefRemotesPrefix + const RefTagsPrefix + const StaleAfter + var ErrStale = errors.New("review snapshot is stale: repository changed since review") + func CommitMessagePrompt(snap *ChangesSnapshot, selected []string) string + func EnsureAncestorsOpen(collapsed map[string]bool, path string) + func Explain(err error) string + func IsGenerated(path string) bool + func LinePatch(path string, h Hunk, selected map[int]bool, unstage bool) (string, bool) + func LocalChangesBlocked(err error) bool + type AutostashResult struct + Kept bool + Stashed bool + type BlameLine struct + Author string + Hash string + Line int + Short string + Summary string + Text string + Time time.Time + type Branch struct + Current bool + HeadShort string + Name string + Upstream string + type Cache struct + func NewCache(runner *Runner) *Cache + func (c *Cache) Get(root string) (*ChangesSnapshot, bool) + func (c *Cache) Invalidate(root string) + func (c *Cache) NeedsRefresh(root string) bool + func (c *Cache) Refresh(ctx context.Context, root string) (*ChangesSnapshot, error) + type ChangeFile struct + Additions int + Binary bool + Deferred bool + Deletions int + Fingerprint string + Generated bool + Hunks []Hunk + OldPath string + Patch []byte + Path string + Staged bool + StagedHunks []Hunk + Status ChangeStatus + TooLarge bool + Truncated bool + Unstaged bool + UnstagedHunks []Hunk + Untracked bool + type ChangeStatus string + const StatusAdded + const StatusConflicted + const StatusCopied + const StatusDeleted + const StatusModified + const StatusRenamed + const StatusTypeChange + const StatusUntracked + func (s ChangeStatus) Letter() string + type ChangesSnapshot struct + Branch string + DiffBase string + Err string + Files []ChangeFile + GeneratedAt time.Time + Head string + NoHead bool + Root string + Signature string + TotalAdditions int + TotalDeletions int + Truncated bool + TruncatedUntracked int + func (s *ChangesSnapshot) ByPath(path string) (ChangeFile, bool) + type CommitDraft struct + Amend bool + Body string + NoVerify bool + Paths []string + SignOff bool + Subject string + type CommitInfo struct + Author string + Hash string + Parents []string + Refs []CommitRef + Short string + Subject string + Time time.Time + type CommitPreflight struct + Branch string + ContentIDs map[string]string + Fingerprints map[string]string + Head string + Root string + Signature string + Untracked map[string]bool + type CommitPromptPreview struct + ExcludedFiles int + IncludedFiles int + Text string + Truncated bool + func PrepareCommitPrompt(snapshot *ChangesSnapshot, selected []string, includeExcerpt bool) CommitPromptPreview + type CommitRef struct + Full string + Head bool + Kind CommitRefKind + Name string + type CommitRefKind string + const RefBranch + const RefRemote + const RefTag + type CommitResult struct + Branch string + Committed []string + Hash string + type ConflictSide string + const ConflictMarked + const ConflictOurs + const ConflictTheirs + type DiffLine struct + Kind LineKind + NewLine int + NoNewline bool + OldLine int + Text string + type ErrClass string + const ErrCancelled + const ErrConflict + const ErrGitMissing + const ErrHookFailed + const ErrLocked + const ErrMergeInProgess + const ErrNotARepo + const ErrOther + const ErrRefusal + const ErrStaleState + const ErrTimeout + const ErrTooLarge + type Error struct + Class ErrClass + ExitCode int + Op string + OpClass OpClass + Paths []string + Stderr string + func GitError(err error) (*Error, bool) + func (e *Error) Error() string + func (e *Error) Unwrap() error + type FileDiff struct + Hunks []Hunk + StagedHunks []Hunk + UnstagedHunks []Hunk + type FlatRow struct + Depth int + Node *TreeNode + func Flatten(node *TreeNode, collapsed map[string]bool) []FlatRow + type GraphQuery struct + Hidden []string + Limit int + type Hunk struct + Lines []DiffLine + NewLines int + NewStart int + OldLines int + OldStart int + Section string + type LineKind uint8 + const KindAdd + const KindContext + const KindDelete + type OpClass string + const OpMutate + const OpRead + type PullMode string + const PullFastForward + const PullMerge + const PullRebase + type PushKind string + const PushBranch + const PushTag + type PushOffer struct + Branches []PushRef + Remote string + Tags []PushRef + type PushRef struct + Ahead int + Behind int + Blocked string + Current bool + Dest string + Kind PushKind + Name string + New bool + Tracked bool + type RebaseAction string + const RebaseDrop + const RebaseFixup + const RebasePick + const RebaseReword + const RebaseSquash + type RebaseCommit struct + Message string + Published bool + type RebaseStep struct + Action RebaseAction + Hash string + Message string + type ReflogEntry struct + Action string + Hash string + Selector string + Subject string + Time time.Time + type Remote struct + FetchURL string + Name string + PushURL string + type RemoteBranch struct + HeadShort string + Name string + Remote string + type RepoFacts struct + Branch string + Head string + NoHead bool + Root string + Signature string + func (f RepoFacts) HeadByte() []byte + type ResetMode string + const ResetHard + const ResetMixed + const ResetSoft + type Runner struct + GitBinary string + Now func() time.Time + func (r *Runner) AddRemote(ctx context.Context, root, name, url string) error + func (r *Runner) AddSubmodule(ctx context.Context, root, address, rel string) error + func (r *Runner) AddWorktree(ctx context.Context, root, path string) error + func (r *Runner) ApplyLines(ctx context.Context, root, path string, h Hunk, selected map[int]bool, ...) error + func (r *Runner) ApplyPatch(ctx context.Context, root, file string) error + func (r *Runner) Blame(ctx context.Context, root, rev, rel string) ([]BlameLine, error) + func (r *Runner) BlobSize(ctx context.Context, root, spec string) (int64, error) + func (r *Runner) BranchUpstream(ctx context.Context, root, branch string) string + func (r *Runner) CapturePreflight(ctx context.Context, root string, snap *ChangesSnapshot, selected []string) (CommitPreflight, error) + func (r *Runner) CheckoutDetached(ctx context.Context, root, hash string) error + func (r *Runner) CheckoutRemoteBranch(ctx context.Context, root, ref string) (SwitchResult, error) + func (r *Runner) CherryPickCommit(ctx context.Context, root, hash string) error + func (r *Runner) Commit(ctx context.Context, root string, draft CommitDraft, pre CommitPreflight, ...) (CommitResult, error) + func (r *Runner) CommitByHash(ctx context.Context, root, hash string) (*CommitInfo, error) + func (r *Runner) CommitMessage(ctx context.Context, root, hash string) (string, error) + func (r *Runner) CommitSnapshot(ctx context.Context, root, hash string) (*ChangesSnapshot, error) + func (r *Runner) CompareToWorktree(ctx context.Context, root, hash string) (*ChangesSnapshot, error) + func (r *Runner) CreateBranch(ctx context.Context, root, name string) (SwitchResult, error) + func (r *Runner) CreateBranchAt(ctx context.Context, root, name, hash string) (SwitchResult, error) + func (r *Runner) CreateTag(ctx context.Context, root, name string) error + func (r *Runner) CreateTagAnnotated(ctx context.Context, root, name, hash, message string) error + func (r *Runner) CreateTagAt(ctx context.Context, root, name, hash string) error + func (r *Runner) CurrentBranch(ctx context.Context, root string) string + func (r *Runner) DefaultRemote(ctx context.Context, root string) string + func (r *Runner) DeleteBranch(ctx context.Context, root, name string) error + func (r *Runner) DeleteRemoteBranch(ctx context.Context, root, remote, name string) error + func (r *Runner) DeleteRemoteTag(ctx context.Context, root, remote, name string) error + func (r *Runner) DeleteTag(ctx context.Context, root, name string) error + func (r *Runner) DeleteUntracked(root string, paths []string) error + func (r *Runner) Discard(ctx context.Context, root string, paths []string) error + func (r *Runner) Facts(ctx context.Context, root string) (RepoFacts, error) + func (r *Runner) Fetch(ctx context.Context, root, remote string) error + func (r *Runner) FetchAll(ctx context.Context, root string, prune bool) error + func (r *Runner) FetchedAt(ctx context.Context, root string) (at time.Time, ok bool) + func (r *Runner) FileHistory(ctx context.Context, root, rel string, limit int) ([]CommitInfo, error) + func (r *Runner) FileLines(ctx context.Context, root, relPath string, start, count int) ([]string, error) + func (r *Runner) FinishSequencer(ctx context.Context, root string, expected SequencerKind, abort bool) error + func (r *Runner) FormatPatch(ctx context.Context, root, hash string) ([]byte, error) + func (r *Runner) GraphPosition(ctx context.Context, root string, q GraphQuery, hash string) (int, error) + func (r *Runner) InteractiveRebase(ctx context.Context, root, base string, steps []RebaseStep) error + func (r *Runner) LastCommitMessage(ctx context.Context, root string) (subject, body string, err error) + func (r *Runner) ListBranches(ctx context.Context, root string) ([]Branch, error) + func (r *Runner) ListCommitGraph(ctx context.Context, root string, q GraphQuery) ([]CommitInfo, error) + func (r *Runner) ListCommits(ctx context.Context, root string, limit int) ([]CommitInfo, error) + func (r *Runner) ListRemoteBranches(ctx context.Context, root string) ([]RemoteBranch, error) + func (r *Runner) ListRemotes(ctx context.Context, root string) ([]Remote, error) + func (r *Runner) ListSubmodules(ctx context.Context, root string) ([]Submodule, error) + func (r *Runner) ListTags(ctx context.Context, root string) ([]Tag, error) + func (r *Runner) ListTree(ctx context.Context, root, rev, dir string) ([]TreeEntry, error) + func (r *Runner) ListWorktrees(ctx context.Context, root string) ([]Worktree, error) + func (r *Runner) LockRepo(root, op string) (func(), error) + func (r *Runner) MergeFastForward(ctx context.Context, root, target string) error + func (r *Runner) MergeInProgress(ctx context.Context, root string) bool + func (r *Runner) MergeNoFastForward(ctx context.Context, root, target string) error + func (r *Runner) MergeSquash(ctx context.Context, root, target string) error + func (r *Runner) Mutate(ctx context.Context, root string, args ...string) ([]byte, error) + func (r *Runner) Pull(ctx context.Context, root, remote, branch string, mode PullMode) error + func (r *Runner) PullFFOnly(ctx context.Context, root, remote, branch string) error + func (r *Runner) Push(ctx context.Context, root, remote, branch string, setUpstream bool) error + func (r *Runner) PushMany(ctx context.Context, root, remote string, refs []PushRef, setUpstream bool) error + func (r *Runner) PushTag(ctx context.Context, root, remote, name string) error + func (r *Runner) PushTo(ctx context.Context, root, remote, src, dst string, setUpstream bool) error + func (r *Runner) Read(ctx context.Context, root string, args ...string) ([]byte, error) + func (r *Runner) ReadBlob(ctx context.Context, root, spec string, max int64) ([]byte, error) + func (r *Runner) ReadFileDiff(ctx context.Context, root, base string, cf ChangeFile) (FileDiff, error) + func (r *Runner) ReadPushOffer(ctx context.Context, root, remote string) (PushOffer, error) + func (r *Runner) RebaseOnto(ctx context.Context, root, target string) error + func (r *Runner) RebasePlan(ctx context.Context, root, base string) ([]RebaseCommit, error) + func (r *Runner) Reflog(ctx context.Context, root string, limit int) ([]ReflogEntry, error) + func (r *Runner) RemoveRemote(ctx context.Context, root, name string) error + func (r *Runner) RemoveSubmodule(ctx context.Context, root, rel string) error + func (r *Runner) RemoveWorktree(ctx context.Context, root, path string) error + func (r *Runner) RenameBranch(ctx context.Context, root, name, to string) error + func (r *Runner) RenameRemote(ctx context.Context, root, name, to string) error + func (r *Runner) RequireCleanWorktree(ctx context.Context, root string) error + func (r *Runner) ResetTo(ctx context.Context, root, hash string, mode ResetMode) (previous string, err error) + func (r *Runner) ResolveCommit(ctx context.Context, root, fullRef string) (string, error) + func (r *Runner) ResolveConflict(ctx context.Context, root, rel string, side ConflictSide) error + func (r *Runner) ResolveRoot(ctx context.Context, dir string) (string, error) + func (r *Runner) RestoreFile(ctx context.Context, root, hash, rel string) error + func (r *Runner) RevertCommit(ctx context.Context, root, hash string) error + func (r *Runner) SequencerState(ctx context.Context, root string) (SequencerStatus, error) + func (r *Runner) SetRemoteURL(ctx context.Context, root, name, url string) error + func (r *Runner) SetUpstream(ctx context.Context, root, branch, upstream string) error + func (r *Runner) Snapshot(ctx context.Context, root string) (*ChangesSnapshot, error) + func (r *Runner) Stage(ctx context.Context, root string, paths []string) error + func (r *Runner) StashApply(ctx context.Context, root, ref string) error + func (r *Runner) StashClear(ctx context.Context, root string) error + func (r *Runner) StashDrop(ctx context.Context, root, ref string) error + func (r *Runner) StashList(ctx context.Context, root string) ([]Stash, error) + func (r *Runner) StashPatch(ctx context.Context, root, ref string) ([]byte, error) + func (r *Runner) StashPop(ctx context.Context, root, ref string) error + func (r *Runner) StashPush(ctx context.Context, root, message string) error + func (r *Runner) StashPushPaths(ctx context.Context, root, message string, paths []string) error + func (r *Runner) StashRename(ctx context.Context, root, hash, message string) error + func (r *Runner) StashSnapshot(ctx context.Context, root, hash string) (*ChangesSnapshot, error) + func (r *Runner) Stdin(ctx context.Context, root, stdin string, args ...string) ([]byte, error) + func (r *Runner) SwitchBranch(ctx context.Context, root, name string) (SwitchResult, error) + func (r *Runner) UndoLastCommit(ctx context.Context, root string) error + func (r *Runner) UnmergedPaths(ctx context.Context, root string) ([]string, error) + func (r *Runner) UnsetUpstream(ctx context.Context, root, branch string) error + func (r *Runner) Unstage(ctx context.Context, root string, noHead bool, paths []string) error + func (r *Runner) UpdateSubmodule(ctx context.Context, root, rel string) error + func (r *Runner) Upstream(ctx context.Context, root string) (UpstreamStatus, error) + func (r *Runner) ValidateBranchName(ctx context.Context, root, name string) error + func (r *Runner) WithAutostash(ctx context.Context, root string, action func() error) (AutostashResult, error) + func (r *Runner) WorkingPatch(ctx context.Context, root string) ([]byte, error) + type SequencerKind string + const SequencerCherryPick + const SequencerMerge + const SequencerNone + const SequencerRevert + const SequencerUnsupported + type SequencerStatus struct + Kind SequencerKind + Unmerged int + UnmergedPaths []string + func (s SequencerStatus) Active() bool + type Stash struct + Base string + Hash string + Ref string + Subject string + type Submodule struct + Commit string + Describe string + Path string + State SubmoduleState + type SubmoduleState string + const SubmoduleClean + const SubmoduleConflict + const SubmoduleModified + const SubmoduleUninitialized + type SwitchResult struct + Branch string + Created bool + type Tag struct + Name string + type TreeEntry struct + Dir bool + Mode string + Name string + Path string + Size int64 + Submodule bool + type TreeNode struct + Children []*TreeNode + Dir bool + File *ChangeFile + Name string + Path string + func BuildTree(files []ChangeFile, compactOneChild bool) *TreeNode + func FilterTree(node *TreeNode, query string) *TreeNode + func (n *TreeNode) Additions() int + func (n *TreeNode) Deletions() int + func (n *TreeNode) FileCount() int + type UpstreamStatus struct + Ahead int + Behind int + Branch string + OK bool + Remote string + func (u UpstreamStatus) Diverged() bool + type WebRepo struct + Base string + Host string + func ParseWebRepo(address string) (WebRepo, bool) + func (w WebRepo) CommitURL(hash string) string + func (w WebRepo) Name() string + type WordRange struct + End int + Start int + func WordDiff(oldLine, newLine string) (oldRanges, newRanges []WordRange, ok bool) + type Worktree struct + Bare bool + Branch string + Detached bool + Head string + Path string v0.1.0 Nov 8, 2026