Versions in this module Expand all Collapse all v0 v0.17.15 May 11, 2026 v0.17.14 May 11, 2026 Changes in this version + const DefaultMaxUndoStackDepth + const MaxRetries + const ReasonNoChanges + const RetryBaseDelay + const UndoDir + var ErrTransactionCommitted = errors.New("transaction already committed") + var ErrTransactionRolledBack = errors.New("transaction was rolled back") + func IsConcurrentModificationError(err error) bool + type Absorber interface + ApplyHunksToBranch func(ctx context.Context, branch Branch, hunksByCommit map[string][]git.Hunk) error + FindTargetCommitForHunk func(hunk git.Hunk, commitSHAs []string) (string, int, error) + type ApplySplitOptions struct + AsSibling bool + BranchNames []string + BranchPoints []int + BranchToSplit string + type BatchFreezeResult struct + AffectedBranches []string + Errors map[string]error + type BatchLockResult struct + AffectedBranches []string + Errors map[string]error + type Branch struct + func FilterBranches(eng StackNavigator, predicate func(Branch) bool) []Branch + func NewBranch(name string, reader branchReader) Branch + func (b Branch) CanModify() bool + func (b Branch) DefaultPRBody() string + func (b Branch) DefaultPRTitle() string + func (b Branch) EnsureCanModify() error + func (b Branch) Equal(other Branch) bool + func (b Branch) GetAllCommits(format CommitFormat) ([]string, error) + func (b Branch) GetCommitAuthor() (string, error) + func (b Branch) GetCommitCount() (int, error) + func (b Branch) GetCommitDate() (time.Time, error) + func (b Branch) GetDiffStats() (added int, deleted int, err error) + func (b Branch) GetExplicitScope() Scope + func (b Branch) GetLockReason() LockReason + func (b Branch) GetMergedDownstack() []git.MergedParent + func (b Branch) GetName() string + func (b Branch) GetPRSubmissionStatus() (PRSubmissionStatus, error) + func (b Branch) GetParent() *Branch + func (b Branch) GetParentOrTrunk() string + func (b Branch) GetPrInfo() (*PrInfo, error) + func (b Branch) GetRevision() (string, error) + func (b Branch) GetScope() Scope + func (b Branch) IsBranchUpToDate() bool + func (b Branch) IsFrozen() bool + func (b Branch) IsLocked() bool + func (b Branch) IsTracked() bool + func (b Branch) IsTrunk() bool + func (b Branch) IsWorktreeAnchor() bool + func (b Branch) ModificationBlocker() string + func (b Branch) NeedsRestack() bool + type BranchInfo interface + BatchGetRevisions func(branchNames []string) (map[string]string, []error) + GetAllCommits func(branch Branch, format CommitFormat) ([]string, error) + GetCommitAuthor func(branch Branch) (string, error) + GetCommitCount func(branch Branch) (int, error) + GetCommitDate func(branch Branch) (time.Time, error) + GetCommitSHA func(branchName string, offset int) (string, error) + GetCurrentRevision func(ctx context.Context) (string, error) + GetDiffStats func(branch Branch) (added int, deleted int, err error) + GetDivergencePoint func(branchName string) (string, error) + GetParentCommitSHA func(commitSHA string) (string, error) + GetRecentTrunkCommits func(count int) ([]git.RecentCommit, error) + GetReflog func(ctx context.Context, count int, format string) (string, error) + GetRevision func(branch Branch) (string, error) + GetRevisionForName func(branchName string) (string, error) + PreloadBranchData func() + type BranchMutations interface + CheckoutBranch func(ctx context.Context, branch Branch) error + CreateAndCheckoutBranch func(ctx context.Context, branch Branch) error + CreateBranch func(ctx context.Context, branchName string, startPoint string) error + DeleteBranch func(ctx context.Context, branch Branch) error + DeleteBranches func(ctx context.Context, branches []Branch) ([]string, error) + Fetch func(ctx context.Context, remote string, branch string) error + InteractiveRebase func(ctx context.Context, onto string) error + Merge func(ctx context.Context, revision string, opts MergeOptions) error + MergeMultiple func(ctx context.Context, branches []string, opts MergeOptions) error + RenameBranch func(ctx context.Context, oldBranch, newBranch Branch) error + ResetHard func(ctx context.Context, revision string) error + ResetMerge func(ctx context.Context, revision string) error + UpdateBranchRef func(ctx context.Context, branchName, revision string) error + type BranchReader interface + type BranchRemoteStatus struct + CommonAncestor string + LocalSha string + RemoteSha string + func (s BranchRemoteStatus) Ahead() bool + func (s BranchRemoteStatus) Behind() bool + func (s BranchRemoteStatus) Diverged() bool + func (s BranchRemoteStatus) Matches() bool + func (s BranchRemoteStatus) MissingRemote() bool + type BranchSet struct + func (s *BranchSet) Contains(name string) bool + func (s *BranchSet) Len() int + func (s *BranchSet) Names() []string + type BranchState struct + BranchType git.BranchType + Frozen bool + LocalModified bool + LockReason git.LockReason + Parent string + RemoteSHA string + Scope string + func (s *BranchState) GetScope() Scope + func (s *BranchState) HasScope() bool + func (s *BranchState) IsLocked() bool + type BranchStateMap map[string]*BranchState + func (m BranchStateMap) Delete(name string) + func (m BranchStateMap) Get(branch Branch) *BranchState + func (m BranchStateMap) GetByName(name string) *BranchState + func (m BranchStateMap) GetOrCreate(name string) *BranchState + func (m BranchStateMap) Has(branch Branch) bool + func (m BranchStateMap) HasByName(name string) bool + func (m BranchStateMap) Set(name string, state *BranchState) + type BranchStatus interface + BatchGetDeletionStatuses func(ctx context.Context, branchNames []string) (map[string]DeletionStatus, error) + FindMostRecentTrackedAncestors func(ctx context.Context, branchName string) ([]string, error) + GetBranch func(branchName string) Branch + GetBranchRemoteDifference func(branchName string) (string, error) + GetBranchRemoteStatus func(branch Branch) (BranchRemoteStatus, error) + GetBranchType func(branch Branch) git.BranchType + GetDeletionStatus func(ctx context.Context, branchName string) (DeletionStatus, error) + GetLockReason func(branch Branch) LockReason + GetMergedBranches func(ctx context.Context, target string) (map[string]bool, error) + GetPrInfo func(branch Branch) (*PrInfo, error) + GetRemote func() string + GetRemoteURL func(ctx context.Context) (string, error) + GetScope func(branch Branch) Scope + GetStackDescription func(branch Branch) *git.StackDescription + IsBranchEmpty func(ctx context.Context, branchName string) (bool, error) + IsFrozen func(branch Branch) bool + IsLocked func(branch Branch) bool + IsMergedIntoTrunk func(ctx context.Context, branchName string) (bool, error) + IsTracked func(branch Branch) bool + IsTrunk func(branch Branch) bool + IsUpToDate func(branch Branch) bool + IsWorktreeAnchor func(branch Branch) bool + type BranchTracking interface + BatchMarkNeedsPRBodyUpdate func(branchNames []string) error + ClearNeedsPRBodyUpdate func(branchName string) error + ClearStackDescription func(ctx context.Context, branch Branch) error + CreateStackRef func(stackID string, meta *git.StackMeta) error + EnsureStackID func(ctx context.Context, branch Branch) (string, error) + GenerateStackID func(rootBranch string) string + GetBranchesNeedingPRBodyUpdate func() []string + GetStackDescription func(branch Branch) *git.StackDescription + GetStackID func(branch Branch) string + GetStackMeta func(stackID string) (*git.StackMeta, error) + ReparentBranch func(ctx context.Context, branch Branch, newParent Branch) error + ReparentBranches func(ctx context.Context, branchNames []string, newParent Branch) error + SetBranchType func(branch Branch, branchType git.BranchType) error + SetFrozen func(ctx context.Context, branches []Branch, frozen bool) (BatchFreezeResult, error) + SetLocked func(ctx context.Context, branches []Branch, reason LockReason) (BatchLockResult, error) + SetParent func(ctx context.Context, branch Branch, parentBranch Branch) error + SetScope func(ctx context.Context, branch Branch, scope Scope) error + SetStackDescription func(ctx context.Context, branch Branch, desc *git.StackDescription) error + SetStackID func(ctx context.Context, branch Branch, stackID string) error + SyncStackIDFromParent func(ctx context.Context, branch Branch) error + TrackBranch func(ctx context.Context, branchName string, parentBranchName string) error + UntrackBranch func(branchName string) error + type BranchWriter interface + type CommitFormat string + const CommitFormatMessage + const CommitFormatReadable + const CommitFormatReadableWithDate + const CommitFormatSHA + const CommitFormatSubject + type CommitOperations interface + Commit func(ctx context.Context, message string, verbose int, noVerify bool) error + CommitWithOptions func(ctx context.Context, opts git.CommitOptions) error + StageAll func(ctx context.Context) error + StageHunks func(ctx context.Context, hunks []git.Hunk) error + StagePatch func(ctx context.Context) error + StashPop func(ctx context.Context) error + StashPush func(ctx context.Context, message string) (string, error) + StashPushStaged func(ctx context.Context, message string) (string, error) + type ContinueRebaseResult struct + BranchName string + RerereResolvedCount int + Result int + type DeletionReasonKind string + const DeletionReasonClosedPR + const DeletionReasonEmptyWithPR + const DeletionReasonGhost + const DeletionReasonMergedIntoTrunk + const DeletionReasonMergedPR + const DeletionReasonNone + type DeletionStatus struct + HasUnpushedChanges bool + Kind DeletionReasonKind + Reason string + SafeToDelete bool + type Engine interface + Git func() git.Runner + SnapshotForWorktree func() WorktreeSnapshot + func NewEngine(opts Options) (Engine, error) + func NewEngineForWorktree(opts WorktreeEngineOptions) (Engine, error) + type FieldDiff struct + Field string + LocalValue any + RemoteValue any + type GitDiffer interface + GetChangedFiles func(ctx context.Context, base, head string) ([]string, error) + GetDiffBetween func(ctx context.Context, base, head string, files ...string) (string, error) + GetMergeBase func(rev1, rev2 string) (string, error) + IsAncestor func(ancestor, descendant string) (bool, error) + IsDiffEmpty func(ctx context.Context, base, head string) (bool, error) + ShowCommits func(ctx context.Context, base, head string, patch, stat bool) (string, error) + ShowDiff func(ctx context.Context, left, right string, stat bool) (string, error) + type IndependentStack struct + Branches []string + RootBranch string + func DiscoverIndependentStacks(eng BranchReader) []IndependentStack + func DiscoverIndependentStacksWithSort(eng BranchReader, strategy SortStrategy) []IndependentStack + type Initializer interface + Rebuild func(newTrunkName string) error + Reset func(newTrunkName string) error + type LockReason = git.LockReason + const LockReasonConsolidating + const LockReasonDraining + const LockReasonNone + const LockReasonUser + type MergeOptions struct + FFOnly bool + Message string + NoEdit bool + NoFF bool + type MetadataDiff struct + Branch string + Differences []FieldDiff + HasConflict bool + LocalMeta *git.Meta + RemoteMeta *git.Meta + type MetadataTx struct + func (tx *MetadataTx) Commit(ctx context.Context) error + func (tx *MetadataTx) DeleteLocalMeta(branch string) error + func (tx *MetadataTx) DeleteMeta(branch string) error + func (tx *MetadataTx) IsCommitted() bool + func (tx *MetadataTx) Rollback() + func (tx *MetadataTx) UpdateLocalMeta(branch string, meta *git.LocalMeta) error + func (tx *MetadataTx) UpdateMeta(branch string, meta *git.Meta) error + type Options struct + Git git.Runner + MaxConcurrency int + MaxUndoStackDepth int + RepoRoot string + Trunk string + Writer io.Writer + type OrphanedMetadataAction string + const OrphanedActionDelete + const OrphanedActionPrompt + type OrphanedMetadataInfo struct + Action OrphanedMetadataAction + BranchName string + ExistsLocally bool + HasLocalChanges bool + LocalMeta *git.Meta + type PRManager interface + ClearNavigationCommentID func(branch Branch) error + GetBranchRemoteStatus func(branch Branch) (BranchRemoteStatus, error) + GetNavigationCommentID func(branch Branch) (int64, error) + PopulateRemoteShas func() error + PushBranch func(ctx context.Context, branch Branch, remote string, opts git.PushOptions) error + SetNavigationCommentID func(branch Branch, commentID int64) error + UpsertPrInfo func(ctx context.Context, branch Branch, prInfo *PrInfo) error + type PRSubmissionStatus struct + Action string + NeedsUpdate bool + PRInfo *PrInfo + PRNumber *int + Reason string + type PendingChange struct + Path string + Staged bool + Status string + type PrInfo struct + func NewPrInfo(number *int, title, body, state, base, url string, isDraft bool) *PrInfo + func NewPrInfoFromMeta(meta *git.Meta) *PrInfo + func NewPrInfoFull(number *int, title, body, state, base, url string, isDraft bool, ...) *PrInfo + func NewPrInfoWithLockReason(number *int, title, body, state, base, url string, isDraft bool, ...) *PrInfo + func (p *PrInfo) Base() string + func (p *PrInfo) Body() string + func (p *PrInfo) IsDraft() bool + func (p *PrInfo) IsLocked() bool + func (p *PrInfo) LockReason() LockReason + func (p *PrInfo) MarshalJSON() ([]byte, error) + func (p *PrInfo) MergeBranch() string + func (p *PrInfo) Number() *int + func (p *PrInfo) State() string + func (p *PrInfo) Title() string + func (p *PrInfo) URL() string + func (p *PrInfo) WithBase(base string) *PrInfo + func (p *PrInfo) WithBody(body string) *PrInfo + func (p *PrInfo) WithIsDraft(isDraft bool) *PrInfo + func (p *PrInfo) WithLockReason(reason LockReason) *PrInfo + func (p *PrInfo) WithMergeBranch(branch string) *PrInfo + func (p *PrInfo) WithNumber(number *int) *PrInfo + func (p *PrInfo) WithState(state string) *PrInfo + func (p *PrInfo) WithTitle(title string) *PrInfo + func (p *PrInfo) WithTitleAndBody(title, body string) *PrInfo + func (p *PrInfo) WithURL(url string) *PrInfo + type PullResult int + const PullConflict + const PullDone + const PullUnneeded + type RebaseSpec struct + Branch string + NewParent string + OldUpstream string + type RebaseValidation struct + ConflictingFiles []string + ErrorMessage string + ErrorType ValidationErrorType + FailedBranch string + NewSHAs map[string]string + RerereResolved map[string]int + Success bool + type RemoteMetadataManager interface + AcceptRemoteMetadata func(branch string) error + ApplyRemoteMetadataIfExists func(branchName string) error + BatchSetLastModifiedBy func(branchNames []string) error + ComputeAllMetadataDiffs func() ([]*MetadataDiff, error) + ComputeMetadataDiff func(branch string) (*MetadataDiff, error) + ConfigureRemoteMetadataSync func(ctx context.Context) error + DeleteLocalMetadataHash func(branchName string) error + DeleteMetadata func(ctx context.Context, branchName string) error + FetchRemoteMetadata func(ctx context.Context) error + FindOrphanedLocalMetadata func() ([]OrphanedMetadataInfo, error) + GetRemoteMetadataCache func() RemoteMetadataView + GetStackIDsForBranches func(branches []Branch) []string + HasLocalModifications func(branch string) bool + IsRemoteSyncEnabled func() bool + LoadRemoteMetadataCache func() error + RejectRemoteMetadata func(branch string) + SetLastModifiedBy func(branchName string) error + SetRemoteSyncEnabled func(enabled bool) + type RemoteMetadataView struct + func (v RemoteMetadataView) Get(branch string) *git.Meta + func (v RemoteMetadataView) Has(branch string) bool + func (v RemoteMetadataView) Len() int + func (v RemoteMetadataView) Range(fn func(branch string, meta *git.Meta) bool) + type RestackBatchResult struct + ConflictBranch string + RebasedBranchBase string + RemainingBranches []string + Results map[string]RestackBranchResult + type RestackBranchProgressFunc func(branch Branch, result RestackBranchResult) + type RestackBranchResult struct + Frozen bool + LockReason LockReason + NewParent string + OldParent string + RebasedBranchBase string + Reparented bool + RerereResolvedCount int + Result RestackResult + func (r RestackBranchResult) IsLocked() bool + type RestackPlan struct + ApplyMap map[string]bool + BranchMap map[string]bool + Items map[string]RestackPlanItem + PlannedResults map[string]RestackBranchResult + Specs []RebaseSpec + type RestackPlanAction int + const RestackPlanApplyAnchor + const RestackPlanApplyFrozen + const RestackPlanApplyValidated + type RestackPlanItem struct + Action RestackPlanAction + Branch string + NewParent string + OldParent string + OldUpstream string + ParentRev string + Reparented bool + Skip bool + SkipResult RestackBranchResult + TargetRev string + type RestackResult int + const RestackConflict + const RestackDone + const RestackUnneeded + type Scope struct + func Empty() Scope + func NewScope(value string) Scope + func None() Scope + func (s *Scope) UnmarshalJSON(data []byte) error + func (s Scope) ApplyToTitle(title string) string + func (s Scope) Equal(other Scope) bool + func (s Scope) IsDefined() bool + func (s Scope) IsEmpty() bool + func (s Scope) IsNone() bool + func (s Scope) MarshalJSON() ([]byte, error) + func (s Scope) String() string + func (s Scope) TitleNeedsUpdate(title string) bool + type Snapshot struct + Args []string + BranchSHAs map[string]string + Command string + CurrentBranch string + MetadataSHAs map[string]string + Timestamp time.Time + type SnapshotInfo struct + Args []string + Command string + DisplayName string + HeadSHA string + ID string + Timestamp time.Time + type SnapshotOptions struct + Args []string + Command string + type SortStrategy string + const SortStrategyAlphabetical + const SortStrategySmart + type SquashOptions struct + Message string + NoEdit bool + NoVerify bool + type StackGraph struct + func BuildStackGraph(eng BranchReader, strategy SortStrategy, filter func(Branch) bool) *StackGraph + func (g *StackGraph) BranchesAtDepth(depth int) []Branch + func (g *StackGraph) ChildBranches(branch Branch) []Branch + func (g *StackGraph) Children(branch Branch) []string + func (g *StackGraph) CollectBranches(root Branch) []Branch + func (g *StackGraph) CurrentBranch() string + func (g *StackGraph) Downstack(branch Branch, includeCurrent bool) []Branch + func (g *StackGraph) ForEachDepth(fn func(depth int, branches []Branch) error) error + func (g *StackGraph) FullStack(branch Branch) []Branch + func (g *StackGraph) GetBranchesByDepth() map[int][]string + func (g *StackGraph) GetNode(branchName string) *StackNode + func (g *StackGraph) IsDescendant(branch Branch, potentialDescendant Branch) bool + func (g *StackGraph) IsLeaf(branch Branch) bool + func (g *StackGraph) IsRelated(branch1, branch2 Branch) bool + func (g *StackGraph) MaxDepth() int + func (g *StackGraph) Node(branch Branch) *StackNode + func (g *StackGraph) Parent(branch Branch) string + func (g *StackGraph) Range(branch Branch, rng StackRange) []Branch + func (g *StackGraph) RootBranches() []string + func (g *StackGraph) TrunkName() string + func (g *StackGraph) Upstack(branch Branch, includeCurrent bool) []Branch + type StackNavigator interface + AllBranches func() []Branch + BranchNames func() *BranchSet + BranchesDepthFirst func(startBranch Branch) iter.Seq2[Branch, int] + CurrentBranch func() *Branch + FindBranchForCommit func(commitSHA string) (string, error) + GetBranch func(branchName string) Branch + GetRemote func() string + GetRepoInfo func(ctx context.Context) (string, string, error) + GetScope func(branch Branch) Scope + Graph func(strategy SortStrategy) *StackGraph + IsBranchEmpty func(ctx context.Context, branchName string) (bool, error) + IsInsideRepo func() bool + SortBranchesTopologically func(branches []Branch) []Branch + Trunk func() Branch + ValidateOnBranch func() (string, error) + type StackNode struct + Branch Branch + Children []string + Depth int + IsTrunk bool + Parent string + type StackRange struct + IncludeCurrent bool + RecursiveChildren bool + RecursiveParents bool + func StackRangeDownstack(includeCurrent bool) StackRange + func StackRangeFull() StackRange + func StackRangeUpstack(includeCurrent bool) StackRange + type StackRewriter interface + ApplySplitToCommits func(ctx context.Context, opts ApplySplitOptions) error + Detach func(ctx context.Context, revision string) error + DetachAndResetBranchChanges func(ctx context.Context, branchName string) error + ForceCheckoutBranch func(ctx context.Context, branch Branch) error + SquashCurrentBranch func(ctx context.Context, opts SquashOptions) error + type SyncManager interface + ContinueRebase func(ctx context.Context, branchName string, rebasedBranchBase string) (ContinueRebaseResult, error) + PlanRestack func(ctx context.Context, branches []Branch) (*RestackPlan, error) + PullTrunk func(ctx context.Context) (PullResult, error) + Rebase func(ctx context.Context, branchName, upstream, oldUpstream string) (RestackResult, error) + ResetTrunkToRemote func(ctx context.Context) error + RestackBranches func(ctx context.Context, branches []Branch) (RestackBatchResult, error) + RestackBranchesWithProgress func(ctx context.Context, branches []Branch, progress RestackBranchProgressFunc) (RestackBatchResult, error) + RestackBranchesWithValidatedPlan func(ctx context.Context, branches []Branch, validation *RebaseValidation, ...) (RestackBatchResult, error) + RestackBranchesWithValidatedRebases func(ctx context.Context, branches []Branch, validation *RebaseValidation, ...) (RestackBatchResult, error) + ValidateRebases func(ctx context.Context, specs []RebaseSpec) (*RebaseValidation, error) + ValidateRebasesParallel func(ctx context.Context, specs []RebaseSpec) (*RebaseValidation, error) + type UndoManager interface + GetSnapshots func() ([]SnapshotInfo, error) + LoadSnapshot func(snapshotID string) (*Snapshot, error) + RestoreSnapshot func(ctx context.Context, snapshotID string) error + TakeSnapshot func(opts SnapshotOptions) error + type ValidationErrorType int + const ValidationErrorConflict + const ValidationErrorNone + const ValidationErrorSystem + type ValidationResult int + const ValidationResultBadParentName + const ValidationResultBadParentRevision + const ValidationResultInvalidParent + const ValidationResultTrunk + const ValidationResultValid + type WorkingTree interface + CheckoutPaths func(ctx context.Context, branch string, pathspecs []string) error + GetCommitTemplate func(ctx context.Context) (string, error) + GetPendingChanges func(ctx context.Context) ([]PendingChange, error) + GetRebaseHead func() (string, error) + GetUnmergedFiles func(ctx context.Context) ([]string, error) + GetUnstagedDiff func(ctx context.Context, files ...string) (string, error) + GetUntrackedFileHunks func(ctx context.Context) ([]git.Hunk, error) + HasStagedChanges func(ctx context.Context) (bool, error) + HasUncommittedChanges func(ctx context.Context) bool + HasUnstagedChanges func(ctx context.Context) (bool, error) + HasUntrackedFiles func(ctx context.Context) (bool, error) + IsRebaseInProgress func(ctx context.Context) bool + ListWorktrees func(ctx context.Context) ([]string, error) + ParseStagedHunks func(ctx context.Context) ([]git.Hunk, error) + RemovePaths func(ctx context.Context, pathspecs []string) error + StashList func(ctx context.Context) (string, error) + type WorktreeCheckoutMode int + const WorktreeCheckoutFull + const WorktreeCheckoutShallow + type WorktreeEngineOptions struct + Snapshot WorktreeSnapshot + WorktreePath string + Writer io.Writer + type WorktreeInfo struct + AnchorBranch string + CreatedAt time.Time + MainRepoDir string + Name string + Path string + type WorktreeOperations interface + AddWorktree func(ctx context.Context, path string, branch string, detach bool) error + CreateTemporaryWorktree func(ctx context.Context, branch string, prefix string) (path string, cleanup func(), err error) + CreateTemporaryWorktreeSkipPrune func(ctx context.Context, branch string, prefix string) (path string, cleanup func(), err error) + PruneWorktrees func(ctx context.Context) error + RemoveWorktree func(ctx context.Context, path string) error + type WorktreePruneMode int + const WorktreePruneAuto + const WorktreePruneSkip + type WorktreeRegistry interface + GetStackRootForBranch func(branch Branch) string + GetWorktreeForStack func(stackRoot string) (*WorktreeInfo, error) + IsInManagedWorktree func() (bool, *WorktreeInfo, error) + ListManagedWorktrees func() ([]WorktreeInfo, error) + RegisterWorktree func(stackRoot string, path string) error + RegisterWorktreeWithName func(anchorBranch string, path string, name string) error + UnregisterWorktree func(stackRoot string) error + type WorktreeSnapshot struct + BranchState BranchStateMap + Branches []string + ChildrenMap map[string][]string + MaxConcurrency int + RemoteMetaCache map[string]*git.Meta + Trunk string