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§
- Freshness
Check - Outcome of comparing a branch’s stored
last_scanned_commitsentinel against the currentgit rev-parse HEADofroot(US-010).
Functions§
- check_
branch_ freshness - Compare
branch_id’s storedlast_scanned_committo the on-disk HEAD of the git working tree atrootand return aFreshnessCheckresult. - get_
head_ commit - Get the current commit hash (HEAD) of the git repository at
path. - record_
branch_ scan_ complete - Record
branch_id’slast_scanned_committo the currentgit rev-parse HEADofroot, after a successful scan/sync.