Skip to main content

Module git_interop

Module git_interop 

Source

Structs§

CommitWithNotes
Represents a commit with its associated git-notes data and metadata.
ReadBranchGuard
Guard for a temporary read branch that includes all pending writes. Automatically cleans up the temporary reference when dropped.

Constants§

REFS_NOTES_BRANCH
The main branch where performance measurements are stored as git notes

Functions§

add_note_line
Appends a note line to a specific commit with exponential backoff retry logic.
add_note_line_to_head
Add a note line to HEAD (convenience wrapper)
check_git_version
create_consolidated_pending_read_branch
Creates a temporary read branch that consolidates ONLY pending writes (excludes remote). This is used by status and reset commands to see only local pending measurements. The returned guard must be kept alive for as long as the reference is needed. The temporary reference is automatically cleaned up when the guard is dropped.
create_consolidated_read_branch
Creates a temporary read branch that consolidates all pending writes. The returned guard must be kept alive for as long as the reference is needed. The temporary reference is automatically cleaned up when the guard is dropped.
create_new_write_ref
Creates a new write ref and updates the symbolic ref to point to it (public wrapper). This is used to ensure concurrent writes go to a new location, preventing race conditions during operations like reset or push.
delete_reference
Delete a git reference (wrapper that converts GitError to anyhow::Error)
get_commit_details
Get detailed commit information (SHA, title, author) for specific commits. This is more efficient than walking commits when you already know which commits you need.
get_commits_with_notes
Get commits that have notes in a specific notes ref. This is much more efficient than walking all commits when you only need commits with measurements.
get_head_revision
get_notes_for_commit
Get the notes content for a specific commit from a notes ref. Returns the note lines as a vector of strings.
get_repository_root
Get the repository root directory using git
get_write_refs
Get all write refs and return their names and OIDs
is_shallow_repository
Check if the current repository is a shallow clone
list_commits_with_measurements
Returns a list of all commit SHA-1 hashes that have performance measurements in the refs/notes/perf-v3 branch.
prune
pull
push
remove_measurements_from_commits
resolve_committish
Resolves a committish reference to a full SHA-1 hash and verifies the commit exists.
walk_commits
Walk commits starting from HEAD (convenience wrapper)
walk_commits_from
Retrieves raw git notes data for commits starting from a specific commit.