Skip to main content

resolve_ref

Function resolve_ref 

Source
pub fn resolve_ref(git_dir: &Path, refname: &str) -> Result<GitHash>
Expand description

Resolve a ref name to its target hash.

Handles:

  • HEAD (may be symbolic or a detached commit hash)
  • refs/heads/<branch>
  • bare 40-hex strings