【发布时间】:2014-02-17 13:49:00
【问题描述】:
我有一个 git log 别名,它将每个提交打印为一行。由于有些人在提交日志中写了太长的单行,因此许多提交换行。如何格式化 git log 输出以在 50 个字符后剪切评论?
我在 git-log 手册页中找到了这个,但它只会填充短的 cmets,不会切割长的。
%<(<N>[,trunc|ltrunc|mtrunc]): make the next placeholder take at least N columns,
padding spaces on the right if necessary. Optionally truncate at the beginning (ltrunc),
the middle (mtrunc) or the end (trunc) if the output is longer than N columns. Note that
truncating only works correctly with N >= 2.
【问题讨论】:
标签: git