Documentation
¶
Overview ¶
Package git provides utilities for working with git repositories, including diff-aware analysis support.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangedFiles ¶
ChangedFiles returns files changed relative to the given ref. It runs: git diff <ref> --name-only
func ChangedFilesStaged ¶
ChangedFilesStaged returns files changed in the staging area (git diff --cached).
func FindRepoRoot ¶
FindRepoRoot finds the git repository root from a given path.
Types ¶
type LineRange ¶
LineRange represents a range of changed lines from a git diff (1-based).
func ChangedLines ¶
ChangedLines returns the line ranges changed in a file relative to the given ref. Uses git diff with -U0 (no context) to get only the changed line numbers.
Click to show internal directories.
Click to hide internal directories.