pub fn head_sha(root: &Path) -> Result<String>
The commit HEAD names, as a full hex SHA.
Returns an error when root is not inside a git repository, or when HEAD names no commit, as in a repository with no commits.
root