Skip to main content

Module git

Module git 

Source
Expand description

Lightweight git integration by shelling out to the git CLI.

wipe is git-native, so git is always present. Rather than pull in a heavy libgit2/gitoxide dependency (and its native build), we invoke git for the few things the UI needs: the commit history of the board, and the contents of a tracked file at a past commit (used for the board-rewind feature).

Structs§

CommitInfo
A single commit’s metadata.
GraphCommit
A commit in the repository graph, with parent links and ref decorations.

Functions§

authors
Distinct commit authors as (name, email), most-recent first.
blob_hash
Compute the git blob hash of bytes (identical to git hash-object).
config_identity
The configured git identity for this repo (Name <email>), if set. Used to attribute UI-driven changes in the activity timeline to the human at the keyboard.
file_at_commit
Read the contents of a tracked file as of a specific commit/ref. Returns None if the file did not exist at that revision.
graph
The commit graph across all branches (most recent first), with parent links, ref decorations, and a flag marking commits that touched the board. Intended for drawing a git-graph view of the board’s history.
is_repo
Whether path is inside a git work tree.
last_change
The most recent commit that touched relpath, if any (for attribution).
log
Return the commit history, most recent first. If pathspec is given, only commits touching that path are returned. limit caps the number of commits.
tracked_blobs
All tracked files as (blob_hash, repo-relative path) pairs.