提交 fa5b4f37 编写于 作者: J Jeff King 提交者: Junio C Hamano

document --pretty=tformat: option

This was introduced in 4da45bef, but never documented anywhere.
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 fe22e542
......@@ -124,3 +124,25 @@ The placeholders are:
- '%m': left, right or boundary mark
- '%n': newline
- '%x00': print a byte from a hex code
* 'tformat:'
+
The 'tformat:' format works exactly like 'format:', except that it
provides "terminator" semantics instead of "separator" semantics. In
other words, each commit has the message terminator character (usually a
newline) appended, rather than a separator placed between entries.
This means that the final entry of a single-line format will be properly
terminated with a new line, just as the "oneline" format does.
For example:
+
---------------------
$ git log -2 --pretty=format:%h 4da45bef \
| perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
4da45be
7134973 -- NO NEWLINE
$ git log -2 --pretty=tformat:%h 4da45bef \
| perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
4da45be
7134973
---------------------
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册