Function git_repository::commit::summary[][src]

pub fn summary(message: &BStr) -> Cow<'_, BStr>
Expand description

Produce a short commit summary for the given message.

This means the following

  • Take the subject line which is delimited by two newlines (\n\n)
  • transform intermediate consecutive whitespace including \r into one space

The resulting summary will have folded whitespace before a newline into spaces and stopped that process once two consecutive newlines are encountered.