Skip to main content

abbrev_hex

Function abbrev_hex 

Source
pub fn abbrev_hex(oid: &ObjectId, abbrev_len: usize) -> String
Expand description

Abbreviate oid to at most abbrev_len hex characters (minimum 4, maximum 40).

§Parameters

  • oid — full commit object id.
  • abbrev_len — desired abbreviation length (clamped to 4..=40 and to the hex length).