git

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Status

type Status struct {
	Branch  string
	Added   int
	Deleted int
	IsRepo  bool
}

Status summarizes the current git branch and unstaged/staged line changes.

func Read

func Read(workDir string) Status

Read returns git metadata for workDir. Non-git directories use Branch "—".

func ReadBranch

func ReadBranch(workDir string) Status

ReadBranch returns the current branch name without opening the repository via go-git. Added and Deleted are always zero; use Read for line stats.

Jump to

Keyboard shortcuts

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