According to git -log manual , ltrunc , mtrunc and trunc is an additional argument for %<(<N>) placeholder, the main purpose of which is to populate:
%<(<N>[,trunc|ltrunc|mtrunc]) : make the next placeholder at least N columns, fill in the spaces if necessary on the right. It is not necessary to trim at the beginning (ltrunc), middle (mtrunc) or end (trunc) if the output is longer than N columns. Note that truncation only works with N> = 2.
At the moment, the git log pretty formats do not seem to have an option that just truncates. I think this looks like a βfairly printedβ one, usually used to render text in tabular form by an easily readable person.
You can remove the extra spaces from git log fairly printed result with some further processing, for example. using sed to replace two or more adjacent spaces with one:
git log --oneline --format="%h %<(70,trunc)%s %cn" | sed -e "s/[ ]\{2,\}/ /g"
famousgarkin
source share