Documentation
¶
Index ¶
- type CherryPickConflictError
- type Manager
- func (m *Manager) AbortCherryPick(path string) error
- func (m *Manager) CheckCherryPickConflicts(path, sourceBranch string) ([]string, error)
- func (m *Manager) CherryPickBranch(path, sourceBranch string) error
- func (m *Manager) CommitAll(path, message string) error
- func (m *Manager) ContinueCherryPick(path string) error
- func (m *Manager) CountCommitsBetween(path, baseBranch, headBranch string) (int, error)
- func (m *Manager) Create(path, branch string) error
- func (m *Manager) CreateBranchFrom(branchName, baseBranch string) error
- func (m *Manager) CreateFromBranch(path, newBranch, baseBranch string) error
- func (m *Manager) CreateWorktreeFromBranch(path, branch string) error
- func (m *Manager) DeleteBranch(branch string) error
- func (m *Manager) FindMainBranch() string
- func (m *Manager) GetBehindCount(path string) (int, error)
- func (m *Manager) GetBranch(path string) (string, error)
- func (m *Manager) GetChangedFiles(path string) ([]string, error)
- func (m *Manager) GetCommitLog(path string) (string, error)
- func (m *Manager) GetCommitsBetween(path, baseBranch, headBranch string) ([]string, error)
- func (m *Manager) GetConflictingFiles(path string) ([]string, error)
- func (m *Manager) GetDiffAgainstMain(path string) (string, error)
- func (m *Manager) HasCommitsBeyond(path, baseBranch string) (bool, error)
- func (m *Manager) HasRebaseConflicts(path string) (bool, error)
- func (m *Manager) HasUncommittedChanges(path string) (bool, error)
- func (m *Manager) IsCherryPickInProgress(path string) bool
- func (m *Manager) List() ([]string, error)
- func (m *Manager) Push(path string, force bool) error
- func (m *Manager) RebaseOnMain(path string) error
- func (m *Manager) Remove(path string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CherryPickConflictError ¶
CherryPickConflictError represents a conflict during cherry-pick
func (*CherryPickConflictError) Error ¶
func (e *CherryPickConflictError) Error() string
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles git worktree operations
func (*Manager) AbortCherryPick ¶
AbortCherryPick aborts an in-progress cherry-pick
func (*Manager) CheckCherryPickConflicts ¶
CheckCherryPickConflicts checks if cherry-picking a branch would cause conflicts Returns a list of files that would conflict, or empty if clean
func (*Manager) CherryPickBranch ¶
CherryPickBranch cherry-picks all commits from sourceBranch that aren't in the current branch It cherry-picks commits one by one in order (oldest first)
func (*Manager) ContinueCherryPick ¶
ContinueCherryPick continues cherry-pick after conflict resolution
func (*Manager) CountCommitsBetween ¶
CountCommitsBetween returns the number of commits between base and head branches. This is more efficient than GetCommitsBetween when you only need the count.
func (*Manager) CreateBranchFrom ¶
CreateBranchFrom creates a new branch from a specified base branch (without creating a worktree)
func (*Manager) CreateFromBranch ¶
CreateFromBranch creates a new worktree at the given path with a new branch based off a specific base branch. This is used when we want a task's branch to start from a consolidated branch rather than HEAD.
func (*Manager) CreateWorktreeFromBranch ¶
CreateWorktreeFromBranch creates a worktree from an existing branch
func (*Manager) DeleteBranch ¶
DeleteBranch deletes a branch
func (*Manager) FindMainBranch ¶
FindMainBranch is the exported version of findMainBranch
func (*Manager) GetBehindCount ¶
GetBehindCount returns how many commits the branch is behind origin/main
func (*Manager) GetChangedFiles ¶
GetChangedFiles returns a list of files changed compared to main
func (*Manager) GetCommitLog ¶
GetCommitLog returns the commit log for the current branch since it diverged from main
func (*Manager) GetCommitsBetween ¶
GetCommitsBetween returns the commit SHAs between base and head (exclusive of base)
func (*Manager) GetConflictingFiles ¶
GetConflictingFiles returns files with merge conflicts in a worktree
func (*Manager) GetDiffAgainstMain ¶
GetDiffAgainstMain returns the diff of the branch against main/master
func (*Manager) HasCommitsBeyond ¶
HasCommitsBeyond returns true if the branch has commits beyond the base branch
func (*Manager) HasRebaseConflicts ¶
HasRebaseConflicts checks if rebasing on main would cause conflicts Returns true if conflicts would occur, false if rebase would be clean
func (*Manager) HasUncommittedChanges ¶
HasUncommittedChanges checks if a worktree has uncommitted changes
func (*Manager) IsCherryPickInProgress ¶
IsCherryPickInProgress returns true if a cherry-pick is in progress
func (*Manager) RebaseOnMain ¶
RebaseOnMain rebases the current branch on main/master