fn git_state(dir: &Path) -> (Option<String>, Option<String>)Expand description
git rev-parse HEAD, and a digest of the uncommitted changes if any.
Both are read from the checkout, not from the manifest: a manifest only ever
names a branch, and a branch is not a version. Returns (None, None) for
anything that is not a git checkout — a path: entry into the source tree
is versioned by whatever contains it.
A dirty tree gets a digest rather than a bare flag. dirty: true says the
commit is not the whole story; a digest says which not-the-whole-story,
so two machines claiming the same lock can be compared. This is the same
device the project’s own reproducibility record uses for its overlays.