Skip to main content

resolve_git_commit

Function resolve_git_commit 

Source
pub fn resolve_git_commit(rev: &str) -> Result<String, String>
Expand description

The full hash of the commit rev names in the current directory’s repository: HEAD, a branch, a tag, origin/main, HEAD~2, a hash or a prefix of one. Anything git cannot resolve to a commit is an error naming rev, never the string stored as if it were a commit: --commit origin/main used to store the literal “origin/main”.