@@ -7,14 +7,14 @@ git-interpret-trailers - Add or parse structured information in commit messages
77
88SYNOPSIS
99--------
10- [verse ]
11- ' git interpret-trailers' [-- in-place] [-- trim-empty]
10+ [synopsis ]
11+ git interpret-trailers [-- in-place] [-- trim-empty]
1212 [(-- trailer (<key >|<key-alias >)[(=|:)<value >])... ]
1313 [-- parse] [<file >... ]
1414
1515DESCRIPTION
1616-----------
17- Add or parse 'trailer' lines that look similar to RFC 822 e-mail
17+ Add or parse _trailer_ lines that look similar to RFC 822 e-mail
1818headers, at the end of the otherwise free-form part of a commit
1919message. For example, in the following commit message
2020
@@ -27,10 +27,10 @@ Signed-off-by: Alice <alice@example.com>
2727Signed-off-by: Bob <bob@example.com>
2828------------------------------------------------
2929
30- the last two lines starting with " Signed-off-by" are trailers.
30+ the last two lines starting with ` Signed-off-by` are trailers.
3131
3232This command reads commit messages from either the
33- <file > arguments or the standard input if no <file > is specified.
33+ _ <file>_ arguments or the standard input if no _ <file>_ is specified.
3434If `--parse` is specified, the output consists of the parsed trailers
3535coming from the input, without influencing them with any command line
3636options or configuration variables.
@@ -43,7 +43,7 @@ to each input file. The result is emitted on the standard output.
4343
4444This command can also operate on the output of linkgit:git-format-patch[1],
4545which is more elaborate than a plain commit message. Namely, such output
46- includes a commit message (as above), a " --- " divider line, and a patch part.
46+ includes a commit message (as above), a ` ---` divider line, and a patch part.
4747For these inputs, the divider and patch parts are not modified by
4848this command and are emitted as is on the output, unless
4949`--no-divider` is specified.
@@ -53,24 +53,24 @@ are applied to each input and the way any existing trailer in
5353the input is changed. They also make it possible to
5454automatically add some trailers.
5555
56- By default, a ' <key>=<value>' or ' <key>:<value>' argument given
56+ By default, a ` <key>=<value>` or ` <key>:<value>` argument given
5757using `--trailer` will be appended after the existing trailers only if
58- the last trailer has a different (<key >, <value >) pair (or if there
59- is no existing trailer). The <key > and <value > parts will be trimmed
58+ the last trailer has a different (_ <key>_ , _ <value>_ ) pair (or if there
59+ is no existing trailer). The _ <key>_ and _ <value>_ parts will be trimmed
6060to remove starting and trailing whitespace, and the resulting trimmed
61- <key > and <value > will appear in the output like this:
61+ _ <key>_ and _ <value>_ will appear in the output like this:
6262
6363------------------------------------------------
6464key: value
6565------------------------------------------------
6666
67- This means that the trimmed <key > and <value > will be separated by
68- `': '` (one colon followed by one space).
67+ This means that the trimmed _ <key>_ and _ <value>_ will be separated by
68+ ": " (one colon followed by one space).
6969
70- For convenience, a <key-alias > can be configured to make using `--trailer`
70+ For convenience, a _ <key-alias>_ can be configured to make using `--trailer`
7171shorter to type on the command line. This can be configured using the
72- ' trailer.<key-alias>.key' configuration variable. The <keyAlias > must be a prefix
73- of the full <key > string, although case sensitivity does not matter. For
72+ ` trailer.<key-alias>.key` configuration variable. The _ <keyAlias>_ must be a prefix
73+ of the full _ <key>_ string, although case sensitivity does not matter. For
7474example, if you have
7575
7676------------------------------------------------
@@ -91,13 +91,13 @@ least one Git-generated or user-configured trailer and consists of at
9191least 25% trailers.
9292The group must be preceded by one or more empty (or whitespace-only) lines.
9393The group must either be at the end of the input or be the last
94- non-whitespace lines before a line that starts with ' ---' (followed by a
94+ non-whitespace lines before a line that starts with ` ---` (followed by a
9595space or the end of the line).
9696
9797When reading trailers, there can be no whitespace before or inside the
98- <key >, but any number of regular space and tab characters are allowed
99- between the <key > and the separator. There can be whitespaces before,
100- inside or after the <value >. The <value > may be split over multiple lines
98+ _ <key>_ , but any number of regular space and tab characters are allowed
99+ between the _ <key>_ and the separator. There can be whitespaces before,
100+ inside or after the _ <value>_ . The _ <value>_ may be split over multiple lines
101101with each subsequent line starting with at least one whitespace, like
102102the "folding" in RFC 822. Example:
103103
@@ -111,77 +111,77 @@ rules for RFC 822 headers. For example they do not follow the encoding rule.
111111
112112OPTIONS
113113-------
114- -- in-place::
114+ ` --in-place` ::
115115 Edit the files in place.
116116
117- -- trim-empty::
118- If the <value > part of any trailer contains only whitespace,
117+ ` --trim-empty` ::
118+ If the _ <value>_ part of any trailer contains only whitespace,
119119 the whole trailer will be removed from the output.
120120 This applies to existing trailers as well as new trailers.
121121
122- -- trailer <key >[(=|:)<value >]::
123- Specify a (<key >, <value >) pair that should be applied as a
122+ ` --trailer <key>[(=|:)<value>]` ::
123+ Specify a (_ <key>_ , _ <value>_ ) pair that should be applied as a
124124 trailer to the inputs. See the description of this
125125 command.
126126
127- -- where <placement >::
128- -- no-where::
127+ ` --where <placement>` ::
128+ ` --no-where` ::
129129 Specify where all new trailers will be added. A setting
130- provided with ' --where' overrides the `trailer.where` and any
130+ provided with ` --where` overrides the `trailer.where` and any
131131 applicable `trailer.<keyAlias>.where` configuration variables
132- and applies to all ' --trailer' options until the next occurrence of
133- ' --where' or ' --no-where' . Upon encountering ' --no-where' , clear the
134- effect of any previous use of ' --where' , such that the relevant configuration
132+ and applies to all ` --trailer` options until the next occurrence of
133+ ` --where` or ` --no-where` . Upon encountering ` --no-where` , clear the
134+ effect of any previous use of ` --where` , such that the relevant configuration
135135 variables are no longer overridden. Possible placements are `after` ,
136136 `before` , `end` or `start` .
137137
138- -- if-exists <action >::
139- -- no-if-exists::
138+ ` --if-exists <action>` ::
139+ ` --no-if-exists` ::
140140 Specify what action will be performed when there is already at
141- least one trailer with the same <key > in the input. A setting
142- provided with ' --if-exists' overrides the `trailer.ifExists` and any
141+ least one trailer with the same _ <key>_ in the input. A setting
142+ provided with ` --if-exists` overrides the `trailer.ifExists` and any
143143 applicable `trailer.<keyAlias>.ifExists` configuration variables
144- and applies to all ' --trailer' options until the next occurrence of
145- ' --if-exists' or ' --no-if-exists' . Upon encountering ' --no-if-exists' , clear the
146- effect of any previous use of ' --if-exists' , such that the relevant configuration
144+ and applies to all ` --trailer` options until the next occurrence of
145+ ` --if-exists` or ` --no-if-exists` . Upon encountering ` --no-if-exists` , clear the
146+ effect of any previous use of ` --if-exists` , such that the relevant configuration
147147 variables are no longer overridden. Possible actions are `addIfDifferent` ,
148148 `addIfDifferentNeighbor` , `add` , `replace` and `doNothing` .
149149
150- -- if-missing <action >::
151- -- no-if-missing::
150+ ` --if-missing <action>` ::
151+ ` --no-if-missing` ::
152152 Specify what action will be performed when there is no other
153- trailer with the same <key > in the input. A setting
154- provided with ' --if-missing' overrides the `trailer.ifMissing` and any
153+ trailer with the same _ <key>_ in the input. A setting
154+ provided with ` --if-missing` overrides the `trailer.ifMissing` and any
155155 applicable `trailer.<keyAlias>.ifMissing` configuration variables
156- and applies to all ' --trailer' options until the next occurrence of
157- ' --if-missing' or ' --no-if-missing' . Upon encountering ' --no-if-missing' ,
158- clear the effect of any previous use of ' --if-missing' , such that the relevant
156+ and applies to all ` --trailer` options until the next occurrence of
157+ ` --if-missing` or ` --no-if-missing` . Upon encountering ` --no-if-missing` ,
158+ clear the effect of any previous use of ` --if-missing` , such that the relevant
159159 configuration variables are no longer overridden. Possible actions are `doNothing`
160160 or `add` .
161161
162- -- only-trailers::
162+ ` --only-trailers` ::
163163 Output only the trailers, not any other parts of the input.
164164
165- -- only-input::
165+ ` --only-input` ::
166166 Output only trailers that exist in the input; do not add any
167167 from the command-line or by applying `trailer.*` configuration
168168 variables.
169169
170- -- unfold::
170+ ` --unfold` ::
171171 If a trailer has a value that runs over multiple lines (aka "folded"),
172172 reformat the value into a single line.
173173
174- -- parse::
174+ ` --parse` ::
175175 A convenience alias for `-- only-trailers -- only-input
176176 -- unfold`. This makes it easier to only see the trailers coming from the
177177 input without influencing them with any command line options or
178178 configuration variables, while also making the output machine-friendly with
179- -- unfold.
179+ ` --unfold` .
180180
181- -- no-divider::
181+ ` --no-divider` ::
182182 Do not treat `---` as the end of the commit message. Use this
183183 when you know your input contains just the commit message itself
184- (and not an email or the output of ` git format-patch` ).
184+ (and not an email or the output of linkgit: git- format-patch[1] ).
185185
186186CONFIGURATION VARIABLES
187187-----------------------
@@ -193,7 +193,7 @@ include::config/trailer.adoc[]
193193EXAMPLES
194194--------
195195
196- * Configure a ' sign' trailer with a ' Signed-off-by' key, and then
196+ * Configure a ` sign` trailer with a ` Signed-off-by` key, and then
197197 add two of these trailers to a commit message file:
198198+
199199------------
@@ -230,18 +230,18 @@ Signed-off-by: Bob <bob@example.com>
230230Acked-by: Alice <alice @example.com >
231231------------
232232
233- * Extract the last commit as a patch, and add a 'Cc' and a
234- ' Reviewed-by' trailer to it:
233+ * Extract the last commit as a patch, and add a `Cc` and a
234+ ` Reviewed-by` trailer to it:
235235+
236236------------
237237$ git format-patch -1
2382380001-foo.patch
239239$ git interpret-trailers -- trailer 'Cc: Alice <alice@example.com>' -- trailer 'Reviewed-by: Bob <bob@example.com>' 0001-foo.patch >0001-bar.patch
240240------------
241241
242- * Configure a ' sign' trailer with a command to automatically add a
243- ' Signed-off-by: ' with the author information only if there is no
244- ' Signed-off-by: ' already, and show how it works:
242+ * Configure a ` sign` trailer with a command to automatically add a
243+ " Signed-off-by: " with the author information only if there is no
244+ " Signed-off-by: " already, and show how it works:
245245+
246246------------
247247$ cat msg1.txt
@@ -272,7 +272,7 @@ body text
272272Signed-off-by: Alice <alice@example.com >
273273------------
274274
275- * Configure a ' fix' trailer with a key that contains a '#' and no
275+ * Configure a ` fix` trailer with a key that contains a `#` and no
276276 space after this character, and show how it works:
277277+
278278------------
@@ -284,7 +284,7 @@ subject
284284 Fix #42
285285------------
286286
287- * Configure a ' help' trailer with a cmd use a script `glog-find-author`
287+ * Configure a ` help` trailer with a cmd use a script `glog-find-author`
288288 which search specified author identity from git log in git repository
289289 and show how it works:
290290+
@@ -308,7 +308,7 @@ Helped-by: Junio C Hamano <gitster@pobox.com>
308308Helped-by: Christian Couder <christian .couder@gmail.com >
309309------------
310310
311- * Configure a ' ref' trailer with a cmd use a script `glog-grep`
311+ * Configure a ` ref` trailer with a cmd use a script `glog-grep`
312312 to grep last relevant commit from git log in the git repository
313313 and show how it works:
314314+
@@ -331,7 +331,7 @@ body text
331331Reference-to: 8bc9a0c769 (Add copyright notices., 2005-04-07)
332332------------
333333
334- * Configure a ' see' trailer with a command to show the subject of a
334+ * Configure a ` see` trailer with a command to show the subject of a
335335 commit that is related, and show how it works:
336336+
337337------------
@@ -359,8 +359,8 @@ See-also: fe3187489d69c4 (subject of related commit)
359359* Configure a commit template with some trailers with empty values
360360 (using sed to show and keep the trailing spaces at the end of the
361361 trailers), then configure a commit-msg hook that uses
362- ' git interpret-trailers' to remove trailers with empty values and
363- to add a ' git-version' trailer:
362+ linkgit: git- interpret-trailers[1] to remove trailers with empty values and
363+ to add a ` git-version` trailer:
364364+
365365------------
366366$ cat temp.txt
0 commit comments