doc: git-log: convert pretty formats to new doc format
- Use _<placeholder>_ instead of <placeholder> in the description - Use `backticks` for keywords and more complex option descriptions. The new rendering engine will apply synopsis rules to these spans. For all the formats in the form of %(foo), the formatting needs to be heavier because we not want the parentheses to be rendered as syntax elements,but as keywords, i.e. we need to circumvent the syntax highlighting of synopsis. In this particular case, this requires the heavy escaping of the parts that contain parentheses with ++. Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jean-Noël Avila committed
Jul 7, 2025 at 18:53 UTC
ca484a90e27c79083ecca3adf2bc8d3c42a5f006
1 file changed
+143
-140
Documentation/pretty-formats.adoc
+143
-140
@@ -2,11 +2,11 @@ PRETTY FORMATS
2
--------------
3
4
If the commit is a merge, and if the pretty-format
5
-is not 'oneline', 'email' or 'raw', an additional line is
6
-inserted before the 'Author:' line. This line begins with
5
+is not `oneline`, `email` or `raw`, an additional line is
6
+inserted before the `Author:` line. This line begins with
7
"Merge: " and the hashes of ancestral commits are printed,
8
separated by spaces. Note that the listed commits may not
9
-necessarily be the list of the *direct* parent commits if you
9
+necessarily be the list of the 'direct' parent commits if you
10
have limited your view of history: for example, if you are
11
only interested in changes related to a certain directory or
12
file.
@@ -14,24 +14,24 @@ file.
14
There are several built-in formats, and you can define
15
additional formats by setting a pretty.<name>
16
config option to either another format name, or a
17
-'format:' string, as described below (see
17
+`format:` string, as described below (see
18
linkgit:git-config[1]). Here are the details of the
19
built-in formats:
20
21
-* 'oneline'
21
+* `oneline`
22
23
<hash> <title-line>
24
+
25
This is designed to be as compact as possible.
26
27
-* 'short'
27
+* `short`
28
29
commit <hash>
30
Author: <author>
31
32
<title-line>
33
34
-* 'medium'
34
+* `medium`
35
36
commit <hash>
37
Author: <author>
@@ -41,7 +41,7 @@ This is designed to be as compact as possible.
41
42
<full-commit-message>
43
44
-* 'full'
44
+* `full`
45
46
commit <hash>
47
Author: <author>
@@ -51,7 +51,7 @@ This is designed to be as compact as possible.
51
52
<full-commit-message>
53
54
-* 'fuller'
54
+* `fuller`
55
56
commit <hash>
57
Author: <author>
@@ -63,18 +63,18 @@ This is designed to be as compact as possible.
63
64
<full-commit-message>
65
66
-* 'reference'
66
+* `reference`
67
68
<abbrev-hash> (<title-line>, <short-author-date>)
69
+
70
This format is used to refer to another commit in a commit message and
71
-is the same as `--pretty='format:%C(auto)%h (%s, %ad)'`. By default,
71
+is the same as ++--pretty=\'format:%C(auto)%h (%s, %ad)'++. By default,
72
the date is formatted with `--date=short` unless another `--date` option
73
is explicitly specified. As with any `format:` with format
74
placeholders, its output is not affected by other options like
75
`--decorate` and `--walk-reflogs`.
76
77
-* 'email'
77
+* `email`
78
79
From <hash> <date>
80
From: <author>
@@ -83,30 +83,30 @@ placeholders, its output is not affected by other options like
83
84
<full-commit-message>
85
86
-* 'mboxrd'
86
+* `mboxrd`
87
+
88
-Like 'email', but lines in the commit message starting with "From "
88
+Like `email`, but lines in the commit message starting with "From "
89
(preceded by zero or more ">") are quoted with ">" so they aren't
90
confused as starting a new commit.
91
92
-* 'raw'
92
+* `raw`
93
+
94
-The 'raw' format shows the entire commit exactly as
94
+The `raw` format shows the entire commit exactly as
95
stored in the commit object. Notably, the hashes are
96
-displayed in full, regardless of whether --abbrev or
97
---no-abbrev are used, and 'parents' information show the
96
+displayed in full, regardless of whether `--abbrev` or
97
+`--no-abbrev` are used, and 'parents' information show the
98
true parent commits, without taking grafts or history
99
simplification into account. Note that this format affects the way
100
commits are displayed, but not the way the diff is shown e.g. with
101
`git log --raw`. To get full object names in a raw diff format,
102
use `--no-abbrev`.
103
104
-* 'format:<format-string>'
104
+* `format:<format-string>`
105
+
106
-The 'format:<format-string>' format allows you to specify which information
106
+The `format:<format-string>` format allows you to specify which information
107
you want to show. It works a little bit like printf format,
108
-with the notable exception that you get a newline with '%n'
109
-instead of '\n'.
108
+with the notable exception that you get a newline with `%n`
109
+instead of `\n`.
110
+
111
E.g, 'format:"The author of %h was %an, %ar%nThe title was >>%s<<%n"'
112
would show something like this:
@@ -120,158 +120,161 @@ The title was >>t4119: test autocomputing -p<n> for traditional diff input.<<
120
The placeholders are:
121
122
- Placeholders that expand to a single literal character:
123
-'%n':: newline
124
-'%%':: a raw '%'
125
-'%x00':: '%x' followed by two hexadecimal digits is replaced with a
123
+++%n++:: newline
124
+++%%++:: a raw ++%++
125
+++%x00++:: ++%x++ followed by two hexadecimal digits is replaced with a
126
byte with the hexadecimal digits' value (we will call this
127
"literal formatting code" in the rest of this document).
128
129
- Placeholders that affect formatting of later placeholders:
130
-'%Cred':: switch color to red
131
-'%Cgreen':: switch color to green
132
-'%Cblue':: switch color to blue
133
-'%Creset':: reset color
134
-'%C(...)':: color specification, as described under Values in the
130
+++%Cred++:: switch color to red
131
+++%Cgreen++:: switch color to green
132
+++%Cblue++:: switch color to blue
133
+++%Creset++:: reset color
134
+++%C(++_<spec>_++)++:: color specification, as described under Values in the
135
"CONFIGURATION FILE" section of linkgit:git-config[1]. By
136
default, colors are shown only when enabled for log output
137
(by `color.diff`, `color.ui`, or `--color`, and respecting
138
the `auto` settings of the former if we are going to a
139
- terminal). `%C(auto,...)` is accepted as a historical
140
- synonym for the default (e.g., `%C(auto,red)`). Specifying
141
- `%C(always,...)` will show the colors even when color is
139
+ terminal). ++%C(auto,++_<spec>_++)++ is accepted as a historical
140
+ synonym for the default (e.g., ++%C(auto,red)++). Specifying
141
+ ++%C(always,++_<spec>_++)++ will show the colors even when color is
142
not otherwise enabled (though consider just using
143
- `--color=always` to enable color for the whole output,
143
+ `--color=always` to enable color for the whole output,
144
including this format and anything else git might color).
145
- `auto` alone (i.e. `%C(auto)`) will turn on auto coloring
145
+ `auto` alone (i.e. ++%C(auto)++) will turn on auto coloring
146
on the next placeholders until the color is switched
147
again.
148
-'%m':: left (`<`), right (`>`) or boundary (`-`) mark
149
-'%w([<w>[,<i1>[,<i2>]]])':: switch line wrapping, like the -w option of
148
+++%m++:: left (`<`), right (`>`) or boundary (`-`) mark
149
+++%w(++`[<w>[,<i1>[,<i2>]]]`++)++:: switch line wrapping, like the `-w` option of
150
linkgit:git-shortlog[1].
151
-'%<( <N> [,trunc|ltrunc|mtrunc])':: make the next placeholder take at
151
+++%<(++`<n>[,(trunc|ltrunc|mtrunc)]`++)++:: make the next placeholder take at
152
least N column widths, padding spaces on
153
the right if necessary. Optionally
154
- truncate (with ellipsis '..') at the left (ltrunc) `..ft`,
154
+ truncate (with ellipsis `..`) at the left (ltrunc) `..ft`,
155
the middle (mtrunc) `mi..le`, or the end
156
(trunc) `rig..`, if the output is longer than
157
- N columns.
157
+ _<n>_ columns.
158
Note 1: that truncating
159
- only works correctly with N >= 2.
160
- Note 2: spaces around the N and M (see below)
159
+ only works correctly with _<n>_ >= 2.
160
+ Note 2: spaces around the _<n>_ and _<m>_ (see below)
161
values are optional.
162
Note 3: Emojis and other wide characters
163
will take two display columns, which may
164
over-run column boundaries.
165
Note 4: decomposed character combining marks
166
may be misplaced at padding boundaries.
167
-'%<|( <M> )':: make the next placeholder take at least until Mth
167
+++%<|(++_<m>_ ++)++:: make the next placeholder take at least until _<m>_ th
168
display column, padding spaces on the right if necessary.
169
- Use negative M values for column positions measured
169
+ Use negative _<m>_ values for column positions measured
170
from the right hand edge of the terminal window.
171
-'%>( <N> )', '%>|( <M> )':: similar to '%<( <N> )', '%<|( <M> )' respectively,
171
+++%>(++_<n>_++)++::
172
+++%>|(++_<m>_++)++:: similar to ++%<(++_<n>_++)++, ++%<|(++_<m>_++)++ respectively,
173
but padding spaces on the left
173
-'%>>( <N> )', '%>>|( <M> )':: similar to '%>( <N> )', '%>|( <M> )'
174
+++%>>(++_<n>_++)++::
175
+++%>>|(++_<m>_++)++:: similar to ++%>(++_<n>_++)++, ++%>|(++_<m>_++)++
176
respectively, except that if the next
177
placeholder takes more spaces than given and
178
there are spaces on its left, use those
179
spaces
178
-'%><( <N> )', '%><|( <M> )':: similar to '%<( <N> )', '%<|( <M> )'
180
+++%><(++_<n>_++)++::
181
+++%><|(++_<m>_++)++:: similar to ++%<(++_<n>_++)++, ++%<|(++_<m>_++)++
182
respectively, but padding both sides
183
(i.e. the text is centered)
184
185
- Placeholders that expand to information extracted from the commit:
183
-'%H':: commit hash
184
-'%h':: abbreviated commit hash
185
-'%T':: tree hash
186
-'%t':: abbreviated tree hash
187
-'%P':: parent hashes
188
-'%p':: abbreviated parent hashes
189
-'%an':: author name
190
-'%aN':: author name (respecting .mailmap, see linkgit:git-shortlog[1]
186
++%H+:: commit hash
187
++%h+:: abbreviated commit hash
188
++%T+:: tree hash
189
++%t+:: abbreviated tree hash
190
++%P+:: parent hashes
191
++%p+:: abbreviated parent hashes
192
++%an+:: author name
193
++%aN+:: author name (respecting .mailmap, see linkgit:git-shortlog[1]
194
or linkgit:git-blame[1])
192
-'%ae':: author email
193
-'%aE':: author email (respecting .mailmap, see linkgit:git-shortlog[1]
195
++%ae+:: author email
196
++%aE+:: author email (respecting .mailmap, see linkgit:git-shortlog[1]
197
or linkgit:git-blame[1])
195
-'%al':: author email local-part (the part before the '@' sign)
196
-'%aL':: author local-part (see '%al') respecting .mailmap, see
198
++%al+:: author email local-part (the part before the `@` sign)
199
++%aL+:: author local-part (see +%al+) respecting .mailmap, see
200
linkgit:git-shortlog[1] or linkgit:git-blame[1])
198
-'%ad':: author date (format respects --date= option)
199
-'%aD':: author date, RFC2822 style
200
-'%ar':: author date, relative
201
-'%at':: author date, UNIX timestamp
202
-'%ai':: author date, ISO 8601-like format
203
-'%aI':: author date, strict ISO 8601 format
204
-'%as':: author date, short format (`YYYY-MM-DD`)
205
-'%ah':: author date, human style (like the `--date=human` option of
201
++%ad+:: author date (format respects --date= option)
202
++%aD+:: author date, RFC2822 style
203
++%ar+:: author date, relative
204
++%at+:: author date, UNIX timestamp
205
++%ai+:: author date, ISO 8601-like format
206
++%aI+:: author date, strict ISO 8601 format
207
++%as+:: author date, short format (`YYYY-MM-DD`)
208
++%ah+:: author date, human style (like the `--date=human` option of
209
linkgit:git-rev-list[1])
207
-'%cn':: committer name
208
-'%cN':: committer name (respecting .mailmap, see
210
++%cn+:: committer name
211
++%cN+:: committer name (respecting .mailmap, see
212
linkgit:git-shortlog[1] or linkgit:git-blame[1])
210
-'%ce':: committer email
211
-'%cE':: committer email (respecting .mailmap, see
213
++%ce+:: committer email
214
++%cE+:: committer email (respecting .mailmap, see
215
linkgit:git-shortlog[1] or linkgit:git-blame[1])
213
-'%cl':: committer email local-part (the part before the '@' sign)
214
-'%cL':: committer local-part (see '%cl') respecting .mailmap, see
216
++%cl+:: committer email local-part (the part before the `@` sign)
217
++%cL+:: committer local-part (see +%cl+) respecting .mailmap, see
218
linkgit:git-shortlog[1] or linkgit:git-blame[1])
216
-'%cd':: committer date (format respects --date= option)
217
-'%cD':: committer date, RFC2822 style
218
-'%cr':: committer date, relative
219
-'%ct':: committer date, UNIX timestamp
220
-'%ci':: committer date, ISO 8601-like format
221
-'%cI':: committer date, strict ISO 8601 format
222
-'%cs':: committer date, short format (`YYYY-MM-DD`)
223
-'%ch':: committer date, human style (like the `--date=human` option of
219
++%cd+:: committer date (format respects --date= option)
220
++%cD+:: committer date, RFC2822 style
221
++%cr+:: committer date, relative
222
++%ct+:: committer date, UNIX timestamp
223
++%ci+:: committer date, ISO 8601-like format
224
++%cI+:: committer date, strict ISO 8601 format
225
++%cs+:: committer date, short format (`YYYY-MM-DD`)
226
++%ch+:: committer date, human style (like the `--date=human` option of
227
linkgit:git-rev-list[1])
225
-'%d':: ref names, like the --decorate option of linkgit:git-log[1]
226
-'%D':: ref names without the " (", ")" wrapping.
227
-'%(decorate[:<options>])'::
228
++%d+:: ref names, like the --decorate option of linkgit:git-log[1]
229
++%D+:: ref names without the " (", ")" wrapping.
230
+++%(decorate++`[:<option>,...]`++)++::
231
ref names with custom decorations. The `decorate` string may be followed by a
232
colon and zero or more comma-separated options. Option values may contain
233
literal formatting codes. These must be used for commas (`%x2C`) and closing
234
parentheses (`%x29`), due to their role in the option syntax.
235
+
233
-** 'prefix=<value>': Shown before the list of ref names. Defaults to "{nbsp}`(`".
234
-** 'suffix=<value>': Shown after the list of ref names. Defaults to "`)`".
235
-** 'separator=<value>': Shown between ref names. Defaults to "`,`{nbsp}".
236
-** 'pointer=<value>': Shown between HEAD and the branch it points to, if any.
237
- Defaults to "{nbsp}`->`{nbsp}".
238
-** 'tag=<value>': Shown before tag names. Defaults to "`tag:`{nbsp}".
236
+** `prefix=<value>`: Shown before the list of ref names. Defaults to "{nbsp}+(+".
237
+** `suffix=<value>`: Shown after the list of ref names. Defaults to "+)+".
238
+** `separator=<value>`: Shown between ref names. Defaults to "+,+{nbsp}".
239
+** `pointer=<value>`: Shown between HEAD and the branch it points to, if any.
240
+ Defaults to "{nbsp}+->+{nbsp}".
241
+** `tag=<value>`: Shown before tag names. Defaults to "`tag:`{nbsp}".
242
243
+
244
For example, to produce decorations with no wrapping
245
or tag annotations, and spaces as separators:
246
+
244
-`%(decorate:prefix=,suffix=,tag=,separator= )`
247
+++%(decorate:prefix=,suffix=,tag=,separator= )++
248
246
-'%(describe[:<options>])'::
249
+++%(describe++`[:<option>,...]`++)++::
250
human-readable name, like linkgit:git-describe[1]; empty string for
251
undescribable commits. The `describe` string may be followed by a colon and
252
zero or more comma-separated options. Descriptions can be inconsistent when
253
tags are added or removed at the same time.
254
+
252
-** 'tags[=<bool-value>]': Instead of only considering annotated tags,
255
+** `tags[=<bool-value>]`: Instead of only considering annotated tags,
256
consider lightweight tags as well.
254
-** 'abbrev=<number>': Instead of using the default number of hexadecimal digits
257
+** `abbrev=<number>`: Instead of using the default number of hexadecimal digits
258
(which will vary according to the number of objects in the repository with a
259
default of 7) of the abbreviated object name, use <number> digits, or as many
260
digits as needed to form a unique object name.
258
-** 'match=<pattern>': Only consider tags matching the given
259
- `glob(7)` pattern, excluding the "refs/tags/" prefix.
260
-** 'exclude=<pattern>': Do not consider tags matching the given
261
- `glob(7)` pattern, excluding the "refs/tags/" prefix.
261
+** `match=<pattern>`: Only consider tags matching the given
262
+ `glob(7)` _<pattern>_, excluding the `refs/tags/` prefix.
263
+** `exclude=<pattern>`: Do not consider tags matching the given
264
+ `glob(7)` _<pattern>_, excluding the `refs/tags/` prefix.
265
263
-'%S':: ref name given on the command line by which the commit was reached
266
++%S+:: ref name given on the command line by which the commit was reached
267
(like `git log --source`), only works with `git log`
265
-'%e':: encoding
266
-'%s':: subject
267
-'%f':: sanitized subject line, suitable for a filename
268
-'%b':: body
269
-'%B':: raw body (unwrapped subject and body)
268
++%e+:: encoding
269
++%s+:: subject
270
++%f+:: sanitized subject line, suitable for a filename
271
++%b+:: body
272
++%B+:: raw body (unwrapped subject and body)
273
ifndef::git-rev-list[]
271
-'%N':: commit notes
274
++%N+:: commit notes
275
endif::git-rev-list[]
273
-'%GG':: raw verification message from GPG for a signed commit
274
-'%G?':: show "G" for a good (valid) signature,
276
++%GG+:: raw verification message from GPG for a signed commit
277
++%G?+:: show "G" for a good (valid) signature,
278
"B" for a bad signature,
279
"U" for a good signature with unknown validity,
280
"X" for a good signature that has expired,
@@ -279,86 +282,86 @@ endif::git-rev-list[]
282
"R" for a good signature made by a revoked key,
283
"E" if the signature cannot be checked (e.g. missing key)
284
and "N" for no signature
282
-'%GS':: show the name of the signer for a signed commit
283
-'%GK':: show the key used to sign a signed commit
284
-'%GF':: show the fingerprint of the key used to sign a signed commit
285
-'%GP':: show the fingerprint of the primary key whose subkey was used
285
++%GS+:: show the name of the signer for a signed commit
286
++%GK+:: show the key used to sign a signed commit
287
++%GF+:: show the fingerprint of the key used to sign a signed commit
288
++%GP+:: show the fingerprint of the primary key whose subkey was used
289
to sign a signed commit
287
-'%GT':: show the trust level for the key used to sign a signed commit
288
-'%gD':: reflog selector, e.g., `refs/stash@{1}` or `refs/stash@{2
290
++%GT+:: show the trust level for the key used to sign a signed commit
291
++%gD+:: reflog selector, e.g., `refs/stash@{1}` or `refs/stash@{2
292
minutes ago}`; the format follows the rules described for the
293
`-g` option. The portion before the `@` is the refname as
294
given on the command line (so `git log -g refs/heads/master`
295
would yield `refs/heads/master@{0}`).
293
-'%gd':: shortened reflog selector; same as `%gD`, but the refname
296
++%gd+:: shortened reflog selector; same as `%gD`, but the refname
297
portion is shortened for human readability (so
298
`refs/heads/master` becomes just `master`).
296
-'%gn':: reflog identity name
297
-'%gN':: reflog identity name (respecting .mailmap, see
299
++%gn+:: reflog identity name
300
++%gN+:: reflog identity name (respecting .mailmap, see
301
linkgit:git-shortlog[1] or linkgit:git-blame[1])
299
-'%ge':: reflog identity email
300
-'%gE':: reflog identity email (respecting .mailmap, see
302
++%ge+:: reflog identity email
303
++%gE+:: reflog identity email (respecting .mailmap, see
304
linkgit:git-shortlog[1] or linkgit:git-blame[1])
302
-'%gs':: reflog subject
303
-'%(trailers[:<options>])'::
305
++%gs+:: reflog subject
306
+++%(trailers++`[:<option>,...]`++)++::
307
display the trailers of the body as interpreted by
308
linkgit:git-interpret-trailers[1]. The `trailers` string may be followed by
309
a colon and zero or more comma-separated options. If any option is provided
310
multiple times, the last occurrence wins.
311
+
309
-** 'key=<key>': only show trailers with specified <key>. Matching is done
312
+** `key=<key>`: only show trailers with specified <key>. Matching is done
313
case-insensitively and trailing colon is optional. If option is
314
given multiple times trailer lines matching any of the keys are
315
shown. This option automatically enables the `only` option so that
316
non-trailer lines in the trailer block are hidden. If that is not
317
desired it can be disabled with `only=false`. E.g.,
315
- `%(trailers:key=Reviewed-by)` shows trailer lines with key
318
+ +%(trailers:key=Reviewed-by)+ shows trailer lines with key
319
`Reviewed-by`.
317
-** 'only[=<bool>]': select whether non-trailer lines from the trailer
320
+** `only[=<bool>]`: select whether non-trailer lines from the trailer
321
block should be included.
319
-** 'separator=<sep>': specify the separator inserted between trailer
322
+** `separator=<sep>`: specify the separator inserted between trailer
323
lines. Defaults to a line feed character. The string <sep> may contain
324
the literal formatting codes described above. To use comma as
325
separator one must use `%x2C` as it would otherwise be parsed as
323
- next option. E.g., `%(trailers:key=Ticket,separator=%x2C )`
326
+ next option. E.g., +%(trailers:key=Ticket,separator=%x2C )+
327
shows all trailer lines whose key is "Ticket" separated by a comma
328
and a space.
326
-** 'unfold[=<bool>]': make it behave as if interpret-trailer's `--unfold`
329
+** `unfold[=<bool>]`: make it behave as if interpret-trailer's `--unfold`
330
option was given. E.g.,
328
- `%(trailers:only,unfold=true)` unfolds and shows all trailer lines.
329
-** 'keyonly[=<bool>]': only show the key part of the trailer.
330
-** 'valueonly[=<bool>]': only show the value part of the trailer.
331
-** 'key_value_separator=<sep>': specify the separator inserted between
331
+ +%(trailers:only,unfold=true)+ unfolds and shows all trailer lines.
332
+** `keyonly[=<bool>]`: only show the key part of the trailer.
333
+** `valueonly[=<bool>]`: only show the value part of the trailer.
334
+** `key_value_separator=<sep>`: specify the separator inserted between
335
the key and value of each trailer. Defaults to ": ". Otherwise it
333
- shares the same semantics as 'separator=<sep>' above.
336
+ shares the same semantics as `separator=<sep>` above.
337
338
NOTE: Some placeholders may depend on other options given to the
336
-revision traversal engine. For example, the `%g*` reflog options will
339
+revision traversal engine. For example, the +%g*+ reflog options will
340
insert an empty string unless we are traversing reflog entries (e.g., by
338
-`git log -g`). The `%d` and `%D` placeholders will use the "short"
341
+`git log -g`). The +%d+ and +%D+ placeholders will use the "short"
342
decoration format if `--decorate` was not already provided on the command
343
line.
344
345
The boolean options accept an optional value `[=<bool-value>]`. The
343
-values taken by `--type=bool` git-config[1], like `yes` and `off`,
346
+values taken by `--type=bool` linkgit:git-config[1], like `yes` and `off`,
347
are all accepted. Giving a boolean option without `=<value>` is
348
equivalent to giving it with `=true`.
349
347
-If you add a `+` (plus sign) after '%' of a placeholder, a line-feed
350
+If you add a `+` (plus sign) after +%+ of a placeholder, a line-feed
351
is inserted immediately before the expansion if and only if the
352
placeholder expands to a non-empty string.
353
351
-If you add a `-` (minus sign) after '%' of a placeholder, all consecutive
354
+If you add a `-` (minus sign) after +%+ of a placeholder, all consecutive
355
line-feeds immediately preceding the expansion are deleted if and only if the
356
placeholder expands to an empty string.
357
355
-If you add a ` ` (space) after '%' of a placeholder, a space
358
+If you add a `' '` (space) after +%+ of a placeholder, a space
359
is inserted immediately before the expansion if and only if the
360
placeholder expands to a non-empty string.
361
359
-* 'tformat:'
362
+* `tformat:`
363
+
361
-The 'tformat:' format works exactly like 'format:', except that it
364
+The `tformat:` format works exactly like `format:`, except that it
365
provides "terminator" semantics instead of "separator" semantics. In
366
other words, each commit has the message terminator character (usually a
367
newline) appended, rather than a separator placed between entries.
@@ -378,7 +381,7 @@ $ git log -2 --pretty=tformat:%h 4da45bef \
381
7134973
382
---------------------
383
+
381
-In addition, any unrecognized string that has a `%` in it is interpreted
384
+In addition, any unrecognized string that has a +%+ in it is interpreted
385
as if it has `tformat:` in front of it. For example, these two are
386
equivalent:
387
+