Documentation
¶
Index ¶
- type Git
- func (g *Git) BareRepoDir() (string, error)
- func (g *Git) CommitsAhead(base string) (int, error)
- func (g *Git) DefaultBranch() (string, error)
- func (g *Git) HasUnpushedCommits() (bool, error)
- func (g *Git) IsDirty() (bool, error)
- func (g *Git) IsRebaseInProgress() bool
- func (g *Git) LocalBranchExists(branch string) bool
- func (g *Git) MergedBranches(base string) ([]string, error)
- func (g *Git) Rebase(onto string) error
- func (g *Git) RebaseAbort() error
- func (g *Git) RemoteBranchExists(branch string) bool
- func (g *Git) RemoteBranches() ([]string, error)
- func (g *Git) Run(args ...string) (string, error)
- func (g *Git) RunStream(stderr io.Writer, args ...string) (string, error)
- func (g *Git) WorktreeRoot() (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Git ¶
func (*Git) BareRepoDir ¶
func (*Git) CommitsAhead ¶ added in v1.0.0
CommitsAhead returns the number of commits HEAD is ahead of base.
func (*Git) DefaultBranch ¶
func (*Git) HasUnpushedCommits ¶
func (*Git) IsRebaseInProgress ¶ added in v1.0.0
IsRebaseInProgress checks if a rebase is currently in progress.
func (*Git) LocalBranchExists ¶ added in v1.0.0
LocalBranchExists checks if a local branch exists in the repo.
func (*Git) MergedBranches ¶ added in v0.7.0
MergedBranches returns branches that have been merged into origin/<base>.
func (*Git) RebaseAbort ¶ added in v1.0.0
RebaseAbort aborts an in-progress rebase.
func (*Git) RemoteBranchExists ¶ added in v1.0.0
RemoteBranchExists checks if a branch exists on origin.
func (*Git) RemoteBranches ¶ added in v1.0.0
RemoteBranches returns remote branch names from origin, stripping the "origin/" prefix. The HEAD pointer is excluded.
func (*Git) RunStream ¶ added in v0.6.2
RunStream captures stdout and returns it, while streaming stderr to the given writer in real-time. Useful for commands like `git fetch --progress` where progress output goes to stderr.