summaryrefslogtreecommitdiffstats
path: root/pretty-formats.txt
diff options
context:
space:
mode:
authorJunio C Hamano <junio@hera.kernel.org>2008-06-13 10:04:01 +0000
committerJunio C Hamano <junio@hera.kernel.org>2008-06-13 10:04:01 +0000
commit6fb124cd538ba3d8d7c5da9bb979b3fd0e1b2925 (patch)
tree42399be6b1d4ba93c664dd7a38942975da9d06f7 /pretty-formats.txt
parentdc8f25ba925d69ae6cd9477948a4681a6b9ba881 (diff)
downloadgit-htmldocs-6fb124cd538ba3d8d7c5da9bb979b3fd0e1b2925.tar.gz
Autogenerated HTML docs for v1.5.6-rc2-45-gdc92c
Diffstat (limited to 'pretty-formats.txt')
-rw-r--r--pretty-formats.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/pretty-formats.txt b/pretty-formats.txt
index e8bea3e18..ec3755579 100644
--- a/pretty-formats.txt
+++ b/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
+---------------------