pub fn resolve_ref(repo: &Path, refspec: &str) -> Result<String, WorktreeError>
Resolve a ref to its 40-char SHA.