git

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HeadSHA

func HeadSHA(repoRoot string) string

HeadSHA returns the current HEAD commit SHA in the given repo. Returns "" if git is unavailable, repoRoot is not a git repo, or the repo has no commits yet. Never returns an error — callers treat "" as "git unavailable" and skip commit tracking gracefully.

func LogSince

func LogSince(repoRoot, startCommit string) []string

LogSince returns a slice of short commit descriptions (e.g. "a1b2c3d fix: typo") for all commits reachable from HEAD that are NOT reachable from startCommit. This is the set of commits made after startCommit became HEAD.

Returns nil when:

  • repoRoot or startCommit is empty
  • git is not installed or repoRoot is not a git repo
  • startCommit is no longer in history (rebase/force-push) — rebase-safe
  • no commits exist since startCommit

Note: commits are repo-wide. In multi-agent scenarios, commits from other agents working in the same repo are included. Git provides no per-agent isolation — this is the correct tradeoff.

Types

This section is empty.

Jump to

Keyboard shortcuts

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