Skip to main content

Module git_utils

Module git_utils 

Source
Expand description

Git utility functions for submodule operations and project freshness.

Provides helpers for extracting git metadata (HEAD commit hash) from any git working tree — submodule, project root, worktree — and recording the commit SHA reached at scan-completion time so subsequent startups can detect divergence (US-009).

Enums§

FreshnessCheck
Outcome of comparing a branch’s stored last_scanned_commit sentinel against the current git rev-parse HEAD of root (US-010).

Functions§

check_branch_freshness
Compare branch_id’s stored last_scanned_commit to the on-disk HEAD of the git working tree at root and return a FreshnessCheck result.
get_head_commit
Get the current commit hash (HEAD) of the git repository at path.
record_branch_scan_complete
Record branch_id’s last_scanned_commit to the current git rev-parse HEAD of root, after a successful scan/sync.