summaryrefslogtreecommitdiff
path: root/Documentation/pretty-formats.txt
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2008-06-12 02:14:28 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-06-12 22:22:36 -0700
commitfa5b4f37e4517c7a422b227f565c9f21bdc8cc65 (patch)
treef4be60f6aaa0e897a366021a3cab83189df8f35c /Documentation/pretty-formats.txt
parentImprove sed portability (diff)
downloadtgif-fa5b4f37e4517c7a422b227f565c9f21bdc8cc65.tar.xz
document --pretty=tformat: option
This was introduced in 4da45bef, but never documented anywhere. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/pretty-formats.txt')
-rw-r--r--Documentation/pretty-formats.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
index e8bea3e18e..ec37555794 100644
--- a/Documentation/pretty-formats.txt
+++ b/Documentation/pretty-formats.txt
@@ -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
+---------------------