pub fn checkout_rev(repo_path: &Path, rev: &str) -> Result<(), String>
Checkout a specific revision (commit SHA) in an already-cloned repo.
This detaches HEAD at the given commit and resets the working tree.