File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -124,3 +124,25 @@ The placeholders are:
124124- '%m': left, right or boundary mark
125125- '%n': newline
126126- '%x00': print a byte from a hex code
127+
128+ * 'tformat:'
129+ +
130+ The 'tformat:' format works exactly like 'format:', except that it
131+ provides "terminator" semantics instead of "separator" semantics. In
132+ other words, each commit has the message terminator character (usually a
133+ newline) appended, rather than a separator placed between entries.
134+ This means that the final entry of a single-line format will be properly
135+ terminated with a new line, just as the "oneline" format does.
136+ For example:
137+ +
138+ ---------------------
139+ $ git log -2 --pretty=format:%h 4da45bef \
140+ | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
141+ 4da45be
142+ 7134973 -- NO NEWLINE
143+
144+ $ git log -2 --pretty=tformat:%h 4da45bef \
145+ | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
146+ 4da45be
147+ 7134973
148+ ---------------------
You can’t perform that action at this time.
0 commit comments