pub fn git_head(root: &Path) -> Result<String>Expand description
Resolve the registry repo’s HEAD commit hex via gix. Errors when
root isn’t a git repo or HEAD can’t be peeled (no commits yet,
detached weirdness, etc) — prepare requires a real git sha to
pin what the registry said at run time.
Public so doctor can use the same check prepare does: a repo that
fails here is a repo run prepare will reject, so doctor’s verdict is
aligned with reality rather than just testing for a .git directory.