Versions in this module Expand all Collapse all v0 v0.0.2 Apr 20, 2026 v0.0.1 Apr 10, 2026 Changes in this version + func BranchExists(name string) bool + func CheckoutBranch(name string) error + func Commit(message string) (string, error) + func CommitInteractive() (string, error) + func ConflictedFiles() ([]string, error) + func CreateBranch(name, base string) error + func CurrentBranch() (string, error) + func DefaultBranch() (string, error) + func DeleteBranch(name string, force bool) error + func DeleteRemoteBranch(remote, branch string) error + func DiffStatRange(base, head string) (additions, deletions int, err error) + func EnableRerere() error + func Fetch(remote string) error + func GitDir() (string, error) + func HasStagedChanges() bool + func IsAncestor(ancestor, descendant string) (bool, error) + func IsRebaseInProgress() bool + func IsRerereDeclined() (bool, error) + func IsRerereEnabled() (bool, error) + func MergeBase(a, b string) (string, error) + func MergeFF(target string) error + func Push(remote string, branches []string, force, atomic bool) error + func Rebase(base string) error + func RebaseAbort() error + func RebaseContinue() error + func RebaseOnto(newBase, oldBase, branch string) error + func ResetHard(ref string) error + func ResolveRemote(branch string) (string, error) + func RevParse(ref string) (string, error) + func RevParseMap(refs []string) (map[string]string, error) + func RevParseMulti(refs []string) ([]string, error) + func SaveRerereDeclined() error + func SetOps(o Ops) func() + func SetUpstreamTracking(branch, remote string) error + func StageAll() error + func StageTracked() error + func UpdateBranchRef(branch, sha string) error + func ValidateRefName(name string) error + type CommitInfo struct + Body string + SHA string + Subject string + Time time.Time + func Log(ref string, maxCount int) ([]CommitInfo, error) + func LogRange(base, head string) ([]CommitInfo, error) + type ConflictMarkerInfo struct + File string + Sections []ConflictSection + func FindConflictMarkers(filePath string) (*ConflictMarkerInfo, error) + type ConflictSection struct + EndLine int + StartLine int + type ErrMultipleRemotes struct + Remotes []string + func (e *ErrMultipleRemotes) Error() string + type FileDiffStat struct + Additions int + Deletions int + Path string + func DiffStatFiles(base, head string) ([]FileDiffStat, error) + type MockOps struct + BranchExistsFn func(string) bool + CheckoutBranchFn func(string) error + CommitFn func(string) (string, error) + CommitInteractiveFn func() (string, error) + ConflictedFilesFn func() ([]string, error) + CreateBranchFn func(string, string) error + CurrentBranchFn func() (string, error) + DefaultBranchFn func() (string, error) + DeleteBranchFn func(string, bool) error + DeleteRemoteBranchFn func(string, string) error + DiffStatFilesFn func(string, string) ([]FileDiffStat, error) + DiffStatRangeFn func(string, string) (int, int, error) + EnableRerereFn func() error + FetchFn func(string) error + FindConflictMarkersFn func(string) (*ConflictMarkerInfo, error) + GitDirFn func() (string, error) + HasStagedChangesFn func() bool + IsAncestorFn func(string, string) (bool, error) + IsRebaseInProgressFn func() bool + IsRerereDeclinedFn func() (bool, error) + IsRerereEnabledFn func() (bool, error) + LogFn func(string, int) ([]CommitInfo, error) + LogRangeFn func(string, string) ([]CommitInfo, error) + MergeBaseFn func(string, string) (string, error) + MergeFFFn func(string) error + PushFn func(string, []string, bool, bool) error + RebaseAbortFn func() error + RebaseContinueFn func() error + RebaseFn func(string) error + RebaseOntoFn func(string, string, string) error + ResetHardFn func(string) error + ResolveRemoteFn func(string) (string, error) + RevParseFn func(string) (string, error) + RevParseMultiFn func([]string) ([]string, error) + SaveRerereDeclinedFn func() error + SetUpstreamTrackingFn func(string, string) error + StageAllFn func() error + StageTrackedFn func() error + UpdateBranchRefFn func(string, string) error + ValidateRefNameFn func(string) error + func (m *MockOps) BranchExists(name string) bool + func (m *MockOps) CheckoutBranch(name string) error + func (m *MockOps) Commit(message string) (string, error) + func (m *MockOps) CommitInteractive() (string, error) + func (m *MockOps) ConflictedFiles() ([]string, error) + func (m *MockOps) CreateBranch(name, base string) error + func (m *MockOps) CurrentBranch() (string, error) + func (m *MockOps) DefaultBranch() (string, error) + func (m *MockOps) DeleteBranch(name string, force bool) error + func (m *MockOps) DeleteRemoteBranch(remote, branch string) error + func (m *MockOps) DiffStatFiles(base, head string) ([]FileDiffStat, error) + func (m *MockOps) DiffStatRange(base, head string) (int, int, error) + func (m *MockOps) EnableRerere() error + func (m *MockOps) Fetch(remote string) error + func (m *MockOps) FindConflictMarkers(filePath string) (*ConflictMarkerInfo, error) + func (m *MockOps) GitDir() (string, error) + func (m *MockOps) HasStagedChanges() bool + func (m *MockOps) IsAncestor(ancestor, descendant string) (bool, error) + func (m *MockOps) IsRebaseInProgress() bool + func (m *MockOps) IsRerereDeclined() (bool, error) + func (m *MockOps) IsRerereEnabled() (bool, error) + func (m *MockOps) Log(ref string, maxCount int) ([]CommitInfo, error) + func (m *MockOps) LogRange(base, head string) ([]CommitInfo, error) + func (m *MockOps) MergeBase(a, b string) (string, error) + func (m *MockOps) MergeFF(target string) error + func (m *MockOps) Push(remote string, branches []string, force, atomic bool) error + func (m *MockOps) Rebase(base string) error + func (m *MockOps) RebaseAbort() error + func (m *MockOps) RebaseContinue() error + func (m *MockOps) RebaseOnto(newBase, oldBase, branch string) error + func (m *MockOps) ResetHard(ref string) error + func (m *MockOps) ResolveRemote(branch string) (string, error) + func (m *MockOps) RevParse(ref string) (string, error) + func (m *MockOps) RevParseMulti(refs []string) ([]string, error) + func (m *MockOps) SaveRerereDeclined() error + func (m *MockOps) SetUpstreamTracking(branch, remote string) error + func (m *MockOps) StageAll() error + func (m *MockOps) StageTracked() error + func (m *MockOps) UpdateBranchRef(branch, sha string) error + func (m *MockOps) ValidateRefName(name string) error + type Ops interface + BranchExists func(name string) bool + CheckoutBranch func(name string) error + Commit func(message string) (string, error) + CommitInteractive func() (string, error) + ConflictedFiles func() ([]string, error) + CreateBranch func(name, base string) error + CurrentBranch func() (string, error) + DefaultBranch func() (string, error) + DeleteBranch func(name string, force bool) error + DeleteRemoteBranch func(remote, branch string) error + DiffStatFiles func(base, head string) ([]FileDiffStat, error) + DiffStatRange func(base, head string) (additions, deletions int, err error) + EnableRerere func() error + Fetch func(remote string) error + FindConflictMarkers func(filePath string) (*ConflictMarkerInfo, error) + GitDir func() (string, error) + HasStagedChanges func() bool + IsAncestor func(ancestor, descendant string) (bool, error) + IsRebaseInProgress func() bool + IsRerereDeclined func() (bool, error) + IsRerereEnabled func() (bool, error) + Log func(ref string, maxCount int) ([]CommitInfo, error) + LogRange func(base, head string) ([]CommitInfo, error) + MergeBase func(a, b string) (string, error) + MergeFF func(target string) error + Push func(remote string, branches []string, force, atomic bool) error + Rebase func(base string) error + RebaseAbort func() error + RebaseContinue func() error + RebaseOnto func(newBase, oldBase, branch string) error + ResetHard func(ref string) error + ResolveRemote func(branch string) (string, error) + RevParse func(ref string) (string, error) + RevParseMulti func(refs []string) ([]string, error) + SaveRerereDeclined func() error + SetUpstreamTracking func(branch, remote string) error + StageAll func() error + StageTracked func() error + UpdateBranchRef func(branch, sha string) error + ValidateRefName func(name string) error + func CurrentOps() Ops