Skip to main content

rev_parse

Function rev_parse 

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

Resolve a revision to the full SHA of the commit it names.

^{commit} matters: git rev-parse v1.2.3 on an annotated tag returns the tag object, not the commit, and notes are attached to commits. Without the peel, tak history v1.2.3 and tak compare v1.2.3 silently find nothing on exactly the revisions people are most likely to name. Harmless for branches and raw SHAs, which peel to themselves.