Versions in this module Expand all Collapse all v0 v0.4.0 May 11, 2026 Changes in this version + func Branch(dir string) (string, error) + func DefaultBranch(dir string) (string, error) + func RemoteSlug(dir string) (org, name string, err error) + func ShowBlob(dir, ref, path string) ([]byte, error) + func ShowFile(dir, ref, path string) ([]string, error) + type Commit struct + Author string + Date time.Time + SHA string + Subject string + func CommitLog(dir, base, head string) ([]Commit, error) + func HunkCommit(dir, base, head, path string, newStart, newCount int) (Commit, error) + func LastCommit(dir string) (Commit, error) + func ShowCommit(dir, sha string) (Commit, error) + type File struct + Binary bool + Hunks []Hunk + NewPath string + OldPath string + Status FileStatus + func Diff(dir, base, head string) ([]File, error) + func DiffCommit(dir, sha string) ([]File, error) + func ParseDiff(raw string) ([]File, error) + func (f File) Adds() int + func (f File) Dels() int + func (f File) Path() string + type FileStatus string + const StatusAdded + const StatusDeleted + const StatusModified + const StatusRenamed + type Hunk struct + Header string + Lines []Line + NewCount int + NewStart int + OldCount int + OldStart int + Section string + func (h Hunk) Adds() int + func (h Hunk) Dels() int + func (h Hunk) Key() string + type Line struct + Content string + Kind LineKind + NewLine int + OldLine int + type LineKind string + const LineAdd + const LineContext + const LineDelete v0.3.0 May 10, 2026 Changes in this version + var FetchTTL = 5 * time.Minute + func Clone(url, dir string) error + func Installed(dir string) (bool, error) + func Pull(dir, branch string) error + type State struct + Behind int + Dirty bool + Diverged bool + Installed bool + func ComputeStatus(dir, branch string) (State, error) + func Status(dir, branch string) (State, error)