Skip to main content

Module git

Module git 

Source
Expand description

Git time-travel intelligence.

Lightweight, on-demand history queries backed by the git CLI: line blame, the commit history of a symbol’s line range, and what changed since a revision. Nothing here is stored in the index — keeping indexing fast — but head records the current commit so callers can detect a branch switch.

Structs§

BlameLine
One blamed line: the commit and author that last touched it.
ChangedFile
A path changed relative to a revision.
Commit
One commit in a history listing.

Functions§

blame
Blame a single 1-based line of rel_path.
changed_since
Files changed relative to rev (e.g. a branch, tag, or HEAD~5).
file_history
Commits that touched rel_path, newest first.
head
The current commit sha and branch name, if root is a repo.
is_repo
True if root is inside a git work tree.
line_history
Commits that touched lines [start, end] of rel_path, newest first.