Skip to main content

resolve_commit

Function resolve_commit 

Source
pub async fn resolve_commit(
    cwd: &Path,
    rev: &str,
    budget: Duration,
) -> Option<String>
Expand description

The commit rev names, as its full id, or None when it names nothing git can read.

This is where an untrusted revision is made safe. --end-of-options stops git reading an option-shaped string as an option of its own, and the answer is checked to be a commit id before anything else uses it - so every argv built from it is a revision and cannot be a flag.