@@ -18,54 +18,72 @@ config option to either another format name, or a
1818linkgit:git-config[1]). Here are the details of the
1919built-in formats:
2020
21- * `oneline`
22-
23- <hash> <title-line>
21+ `oneline` ::
22+ +
23+ [synopsis]
24+ --
25+ `<hash> <title-line>`
26+ --
2427+
2528This is designed to be as compact as possible.
2629
27- * `short`
28-
29- commit <hash>
30- Author: <author>
31-
32- <title-line>
33-
34- * `medium`
35-
36- commit <hash>
37- Author: <author>
38- Date: <author-date>
39-
40- <title-line>
30+ `short` ::
31+ +
32+ [synopsis]
33+ --
34+ commit <hash >
35+ Author: <author >
4136
42- <full-commit-message>
37+ <title-line>
38+ --
4339
44- * `full`
40+ `medium`::
41+ +
42+ [synopsis]
43+ --
44+ commit <hash>
45+ Author: <author>
46+ Date: <author-date>
4547
46- commit <hash>
47- Author: <author>
48- Commit: <committer>
48+ <title-line>
4949
50- <title-line>
50+ <full-commit-message>
51+ --
5152
52- <full-commit-message>
53+ `full`::
54+ +
55+ [synopsis]
56+ --
57+ commit <hash>
58+ Author: <author>
59+ Commit: <committer>
5360
54- * `fuller`
61+ <title-line>
5562
56- commit <hash>
57- Author: <author>
58- AuthorDate: <author-date>
59- Commit: <committer>
60- CommitDate: <committer-date>
63+ <full-commit-message>
64+ --
6165
62- <title-line>
66+ `fuller`::
67+ +
68+ [synopsis]
69+ --
70+ commit <hash>
71+ Author: <author>
72+ AuthorDate: <author-date>
73+ Commit: <committer>
74+ CommitDate: <committer-date>
6375
64- <full-commit-message >
76+ <title-line >
6577
66- * `reference`
78+ <full-commit-message>
79+ --
6780
68- <abbrev-hash> (<title-line>, <short-author-date>)
81+ `reference`::
82+ +
83+ [synopsis]
84+ --
85+ <abbrev-hash> (<title-line>, <short-author-date>)
86+ --
6987+
7088This format is used to refer to another commit in a commit message and
7189is the same as ++--pretty=\'format:%C(auto)%h (%s, %ad)'++. By default,
@@ -74,23 +92,24 @@ is explicitly specified. As with any `format:` with format
7492placeholders, its output is not affected by other options like
7593`--decorate` and `--walk-reflogs`.
7694
77- * `email`
78-
79- From <hash> <date>
80- From: <author>
81- Date: <author-date>
82- Subject: [PATCH] <title-line>
95+ `email`::
96+ +
97+ [synopsis]
98+ --
99+ From <hash> <date>
100+ From: <author>
101+ Date: <author-date>
102+ Subject: [PATCH] <title-line>
83103
84- <full-commit-message>
104+ <full-commit-message>
105+ --
85106
86- * `mboxrd`
87- +
107+ `mboxrd`::
88108Like `email`, but lines in the commit message starting with "From "
89109(preceded by zero or more ">") are quoted with ">" so they aren't
90110confused as starting a new commit.
91111
92- * `raw`
93- +
112+ `raw`::
94113The `raw` format shows the entire commit exactly as
95114stored in the commit object. Notably, the hashes are
96115displayed in full, regardless of whether `--abbrev` or
@@ -101,8 +120,7 @@ commits are displayed, but not the way the diff is shown e.g. with
101120`git log --raw`. To get full object names in a raw diff format,
102121use `--no-abbrev`.
103122
104- * `format:<format-string>`
105- +
123+ `format:<format-string>`::
106124The `format:<format-string>` format allows you to specify which information
107125you want to show. It works a little bit like printf format,
108126with the notable exception that you get a newline with `%n`
@@ -120,13 +138,18 @@ The title was >>t4119: test autocomputing -p<n> for traditional diff input.<<
120138The placeholders are:
121139
122140- Placeholders that expand to a single literal character:
141+ +
142+ --
123143++%n++:: newline
124144++%%++:: a raw ++%++
125145++%x00++:: ++%x++ followed by two hexadecimal digits is replaced with a
126146 byte with the hexadecimal digits' value (we will call this
127147 "literal formatting code" in the rest of this document).
148+ --
128149
129150- Placeholders that affect formatting of later placeholders:
151+ +
152+ ---
130153++%Cred++:: switch color to red
131154++%Cgreen++:: switch color to green
132155++%Cblue++:: switch color to blue
@@ -181,8 +204,10 @@ The placeholders are:
181204++%><|(++_<m>_++)++:: similar to ++%<(++_<n>_++)++, ++%<|(++_<m>_++)++
182205 respectively, but padding both sides
183206 (i.e. the text is centered)
184-
207+ ---
185208- Placeholders that expand to information extracted from the commit:
209+ +
210+ ---
186211+%H+:: commit hash
187212+%h+:: abbreviated commit hash
188213+%T+:: tree hash
@@ -311,29 +336,29 @@ linkgit:git-interpret-trailers[1]. The `trailers` string may be followed by
311336a colon and zero or more comma-separated options. If any option is provided
312337multiple times, the last occurrence wins.
313338+
314- ** `key=<key>`: only show trailers with specified <key>. Matching is done
339+ * `key=<key>`: only show trailers with specified <key>. Matching is done
315340 case-insensitively and trailing colon is optional. If option is
316341 given multiple times trailer lines matching any of the keys are
317342 shown. This option automatically enables the `only` option so that
318343 non-trailer lines in the trailer block are hidden. If that is not
319344 desired it can be disabled with `only=false`. E.g.,
320345 +%(trailers:key=Reviewed-by)+ shows trailer lines with key
321346 `Reviewed-by`.
322- ** `only[=<bool>]`: select whether non-trailer lines from the trailer
347+ * `only[=<bool>]`: select whether non-trailer lines from the trailer
323348 block should be included.
324- ** `separator=<sep>`: specify the separator inserted between trailer
349+ * `separator=<sep>`: specify the separator inserted between trailer
325350 lines. Defaults to a line feed character. The string <sep> may contain
326351 the literal formatting codes described above. To use comma as
327352 separator one must use `%x2C` as it would otherwise be parsed as
328353 next option. E.g., +%(trailers:key=Ticket,separator=%x2C )+
329354 shows all trailer lines whose key is "Ticket" separated by a comma
330355 and a space.
331- ** `unfold[=<bool>]`: make it behave as if interpret-trailer's `--unfold`
356+ * `unfold[=<bool>]`: make it behave as if interpret-trailer's `--unfold`
332357 option was given. E.g.,
333358 +%(trailers:only,unfold=true)+ unfolds and shows all trailer lines.
334- ** `keyonly[=<bool>]`: only show the key part of the trailer.
335- ** `valueonly[=<bool>]`: only show the value part of the trailer.
336- ** `key_value_separator=<sep>`: specify the separator inserted between
359+ * `keyonly[=<bool>]`: only show the key part of the trailer.
360+ * `valueonly[=<bool>]`: only show the value part of the trailer.
361+ * `key_value_separator=<sep>`: specify the separator inserted between
337362 the key and value of each trailer. Defaults to ": ". Otherwise it
338363 shares the same semantics as `separator=<sep>` above.
339364
@@ -360,9 +385,9 @@ placeholder expands to an empty string.
360385If you add a `' '` (space) after +%+ of a placeholder, a space
361386is inserted immediately before the expansion if and only if the
362387placeholder expands to a non-empty string.
388+ ---
363389
364- * `tformat:`
365- +
390+ `tformat:`::
366391The `tformat:` format works exactly like `format:`, except that it
367392provides "terminator" semantics instead of "separator" semantics. In
368393other words, each commit has the message terminator character (usually a
0 commit comments