git

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotGitRepo = errors.New("not a git repository")

Functions

func CommitsSince

func CommitsSince(repo *git.Repository, sinceHash string) ([]*object.Commit, error)

CommitsSince returns all commits after (not including) the given hash. It walks from HEAD backwards and stops when it reaches the given hash.

func GetHEADSHA

func GetHEADSHA(repo *git.Repository) (string, error)

func OpenGitRepo

func OpenGitRepo(path string) (*git.Repository, error)

func PatchAddsDeletes

func PatchAddsDeletes(patch *object.Patch) (added int64, deleted int64)

func PatchSince

func PatchSince(repo *git.Repository, sinceHash string) (*object.Patch, error)

func UnstagedChangeCount

func UnstagedChangeCount(repo *git.Repository) (int64, error)

UnstagedChangeCount returns the count of tracked files with unstaged changes. It counts files with Modified, Deleted, or Renamed status in the worktree. Untracked files are ignored.

Types

This section is empty.

Jump to

Keyboard shortcuts

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