Skip to main content

format_reference_line

Function format_reference_line 

Source
pub fn format_reference_line(
    oid: &ObjectId,
    subject_first_line: &str,
    committer_ident: &str,
    abbrev_len: usize,
) -> String
Expand description

One-line reference format: abbrev (subject, YYYY-MM-DD).

Matches upstream git show -s --pretty=reference / sequencer refer_to_commit output.

ยงParameters

  • subject_first_line โ€” first line of the commit message (no trailing newline).
  • committer_ident โ€” raw committer header line (Name <email> epoch tz).
  • abbrev_len โ€” abbreviation length for the hash (typically 7).