git

package
v0.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Git

type Git struct {
	Dir     string
	Verbose bool
}

func (*Git) BareRepoDir

func (g *Git) BareRepoDir() (string, error)

func (*Git) DefaultBranch

func (g *Git) DefaultBranch() (string, error)

func (*Git) HasUnpushedCommits

func (g *Git) HasUnpushedCommits() (bool, error)

func (*Git) IsDirty

func (g *Git) IsDirty() (bool, error)

func (*Git) Run

func (g *Git) Run(args ...string) (string, error)

func (*Git) RunStream added in v0.6.2

func (g *Git) RunStream(stderr io.Writer, args ...string) (string, error)

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.

func (*Git) WorktreeRoot

func (g *Git) WorktreeRoot() (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL