Skip to main content

resolve_commit

Function resolve_commit 

Source
pub async fn resolve_commit(
    repo: &Path,
    sha: &str,
) -> Result<ResolvedCommit, GitError>
Expand description

Resolve a commit sha (any rev git accepts) to its metadata + changed files. Returns GitError::NotARepository mapped from a bad-revision failure so the caller can surface a 404 for an unknown commit.

Shells git show --no-patch (metadata) + git show --name-only (files), mirroring the other api operations. Used by the _prov/{commit_sha} route to map a git-mark back to its resource + [ProvenanceMark].