doc: convert git-am synopsis and options to new style
Convert git-am from [verse]/single-quote style to the modern synopsis-block style: - Replace [verse] with [synopsis] in SYNOPSIS block - Backtick-quote all OPTIONS terms - Convert inline man page refs - Convert inline command refs - Convert prose placeholders: 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
May 25, 2026 at 10:28 UTC
242d3aa317ccaa3e7c5f6bf2218ccbdd8a0a26e9
4 files changed
+72
-72
Documentation/config/am.adoc
+3
-3
@@ -1,11 +1,11 @@
1
-am.keepcr::
1
+`am.keepcr`::
2
If true, linkgit:git-am[1] will call linkgit:git-mailsplit[1]
3
for patches in mbox format with parameter `--keep-cr`. In this
4
case linkgit:git-mailsplit[1] will
5
not remove `\r` from lines ending with `\r\n`. Can be overridden
6
by giving `--no-keep-cr` from the command line.
7
8
-am.threeWay::
8
+`am.threeWay`::
9
By default, linkgit:git-am[1] will fail if the patch does not
10
apply cleanly. When set to true, this setting tells
11
linkgit:git-am[1] to fall back on 3-way merge if the patch
@@ -13,7 +13,7 @@ am.threeWay::
13
have those blobs available locally (equivalent to giving the
14
`--3way` option from the command line). Defaults to `false`.
15
16
-am.messageId::
16
+`am.messageId`::
17
Add a `Message-ID` trailer based on the email header to the
18
commit when using linkgit:git-am[1] (see
19
linkgit:git-interpret-trailers[1]). See also the `--message-id`
Documentation/format-patch-caveats.adoc
+1
-1
@@ -28,6 +28,6 @@ repositories. This goes to show that this behavior does not only impact
28
email workflows.
29
30
Given these limitations, one might be tempted to use a general-purpose
31
-utility like patch(1) instead. However, patch(1) will not only look for
31
+utility like `patch`(1) instead. However, `patch`(1) will not only look for
32
unindented diffs (like linkgit:git-am[1]) but will try to apply indented
33
diffs as well.
Documentation/format-patch-end-of-commit-message.adoc
+2
-2
@@ -1,8 +1,8 @@
1
Any line that is of the form:
2
3
* three-dashes and end-of-line, or
4
-* a line that begins with "diff -", or
5
-* a line that begins with "Index: "
4
+* a line that begins with `diff -`, or
5
+* a line that begins with `Index: `
6
7
is taken as the beginning of a patch, and the commit log message
8
is terminated before the first occurrence of such a line.
Documentation/git-am.adoc
+66
-66
@@ -8,17 +8,17 @@ git-am - Apply a series of patches from a mailbox
8
9
SYNOPSIS
10
--------
11
-[verse]
12
-'git am' [--signoff] [--keep] [--[no-]keep-cr] [--[no-]utf8] [--[no-]verify]
11
+[synopsis]
12
+git am [--signoff] [--keep] [--[no-]keep-cr] [--[no-]utf8] [--[no-]verify]
13
[--[no-]3way] [--interactive] [--committer-date-is-author-date]
14
[--ignore-date] [--ignore-space-change | --ignore-whitespace]
15
[--whitespace=<action>] [-C<n>] [-p<n>] [--directory=<dir>]
16
[--exclude=<path>] [--include=<path>] [--reject] [-q | --quiet]
17
- [--[no-]scissors] [-S[<keyid>]] [--patch-format=<format>]
17
+ [--[no-]scissors] [-S[<key-id>]] [--patch-format=<format>]
18
[--quoted-cr=<action>]
19
[--empty=(stop|drop|keep)]
20
[(<mbox> | <Maildir>)...]
21
-'git am' (--continue | --skip | --abort | --quit | --retry | --show-current-patch[=(diff|raw)] | --allow-empty)
21
+git am (--continue | --skip | --abort | --quit | --retry | --show-current-patch[=(diff|raw)] | --allow-empty)
22
23
DESCRIPTION
24
-----------
@@ -30,45 +30,45 @@ history without merges.
30
31
OPTIONS
32
-------
33
-(<mbox>|<Maildir>)...::
33
+`(<mbox>|<Maildir>)...`::
34
The list of mailbox files to read patches from. If you do not
35
supply this argument, the command reads from the standard input.
36
If you supply directories, they will be treated as Maildirs.
37
38
--s::
39
---signoff::
38
+`-s`::
39
+`--signoff`::
40
Add a `Signed-off-by` trailer to the commit message (see
41
linkgit:git-interpret-trailers[1]), using the committer identity
42
of yourself. See the signoff option in linkgit:git-commit[1]
43
for more information.
44
45
--k::
46
---keep::
45
+`-k`::
46
+`--keep`::
47
Pass `-k` flag to linkgit:git-mailinfo[1].
48
49
---keep-non-patch::
49
+`--keep-non-patch`::
50
Pass `-b` flag to linkgit:git-mailinfo[1].
51
52
---keep-cr::
53
---no-keep-cr::
52
+`--keep-cr`::
53
+`--no-keep-cr`::
54
With `--keep-cr`, call linkgit:git-mailsplit[1]
55
with the same option, to prevent it from stripping CR at the end of
56
lines. `am.keepcr` configuration variable can be used to specify the
57
default behaviour. `--no-keep-cr` is useful to override `am.keepcr`.
58
59
--c::
60
---scissors::
59
+`-c`::
60
+`--scissors`::
61
Remove everything in body before a scissors line (see
62
linkgit:git-mailinfo[1]). Can be activated by default using
63
the `mailinfo.scissors` configuration variable.
64
65
---no-scissors::
65
+`--no-scissors`::
66
Ignore scissors lines (see linkgit:git-mailinfo[1]).
67
68
---quoted-cr=<action>::
68
+`--quoted-cr=<action>`::
69
This flag will be passed down to linkgit:git-mailinfo[1].
70
71
---empty=(drop|keep|stop)::
71
+`--empty=(drop|keep|stop)`::
72
How to handle an e-mail message lacking a patch:
73
+
74
--
@@ -82,23 +82,23 @@ OPTIONS
82
session. This is the default behavior.
83
--
84
85
--m::
86
---message-id::
85
+`-m`::
86
+`--message-id`::
87
Pass the `-m` flag to linkgit:git-mailinfo[1],
88
so that the `Message-ID` header is added to the commit message.
89
The `am.messageid` configuration variable can be used to specify
90
the default behaviour.
91
92
---no-message-id::
92
+`--no-message-id`::
93
Do not add the Message-ID header to the commit message.
94
`--no-message-id` is useful to override `am.messageid`.
95
96
--q::
97
---quiet::
96
+`-q`::
97
+`--quiet`::
98
Be quiet. Only print error messages.
99
100
--u::
101
---utf8::
100
+`-u`::
101
+`--utf8`::
102
Pass `-u` flag to linkgit:git-mailinfo[1].
103
The proposed commit log message taken from the e-mail
104
is re-coded into UTF-8 encoding (configuration variable
@@ -108,57 +108,57 @@ OPTIONS
108
This was optional in prior versions of git, but now it is the
109
default. You can use `--no-utf8` to override this.
110
111
---no-utf8::
111
+`--no-utf8`::
112
Pass `-n` flag to linkgit:git-mailinfo[1].
113
114
--3::
115
---3way::
116
---no-3way::
114
+`-3`::
115
+`--3way`::
116
+`--no-3way`::
117
When the patch does not apply cleanly, fall back on
118
3-way merge if the patch records the identity of blobs
119
it is supposed to apply to and we have those blobs
120
available locally. `--no-3way` can be used to override
121
- am.threeWay configuration variable. For more information,
122
- see am.threeWay in linkgit:git-config[1].
121
+ `am.threeWay` configuration variable. For more information,
122
+ see `am.threeWay` in linkgit:git-config[1].
123
124
include::rerere-options.adoc[]
125
126
---ignore-space-change::
127
---ignore-whitespace::
128
---whitespace=<action>::
129
--C<n>::
130
--p<n>::
131
---directory=<dir>::
132
---exclude=<path>::
133
---include=<path>::
134
---reject::
126
+`--ignore-space-change`::
127
+`--ignore-whitespace`::
128
+`--whitespace=<action>`::
129
+`-C<n>`::
130
+`-p<n>`::
131
+`--directory=<dir>`::
132
+`--exclude=<path>`::
133
+`--include=<path>`::
134
+`--reject`::
135
These flags are passed to the linkgit:git-apply[1] program that
136
applies the patch.
137
+
138
-Valid <action> for the `--whitespace` option are:
138
+Valid _<action>_ for the `--whitespace` option are:
139
`nowarn`, `warn`, `fix`, `error`, and `error-all`.
140
141
---patch-format::
141
+`--patch-format`::
142
By default the command will try to detect the patch format
143
automatically. This option allows the user to bypass the automatic
144
detection and specify the patch format that the patch(es) should be
145
interpreted as. Valid formats are mbox, mboxrd,
146
stgit, stgit-series, and hg.
147
148
--i::
149
---interactive::
148
+`-i`::
149
+`--interactive`::
150
Run interactively.
151
152
---verify::
153
--n::
154
---no-verify::
152
+`--verify`::
153
+`-n`::
154
+`--no-verify`::
155
Run the `pre-applypatch` and `applypatch-msg` hooks. This is the
156
default. Skip these hooks with `-n` or `--no-verify`. See also
157
linkgit:githooks[5].
158
+
159
Note that `post-applypatch` cannot be skipped.
160
161
---committer-date-is-author-date::
161
+`--committer-date-is-author-date`::
162
By default the command records the date from the e-mail
163
message as the commit author date, and uses the time of
164
commit creation as the committer date. This allows the
@@ -172,29 +172,29 @@ committer date when applying commits on top of a base which commit is
172
older (in terms of the commit date) than the oldest patch you are
173
applying.
174
175
---ignore-date::
175
+`--ignore-date`::
176
By default the command records the date from the e-mail
177
message as the commit author date, and uses the time of
178
commit creation as the committer date. This allows the
179
user to lie about the author date by using the same
180
value as the committer date.
181
182
---skip::
182
+`--skip`::
183
Skip the current patch. This is only meaningful when
184
restarting an aborted patch.
185
186
--S[<keyid>]::
187
---gpg-sign[=<keyid>]::
188
---no-gpg-sign::
189
- GPG-sign commits. The `keyid` argument is optional and
186
+`-S[<key-id>]`::
187
+`--gpg-sign[=<key-id>]`::
188
+`--no-gpg-sign`::
189
+ GPG-sign commits. The _<key-id>_ is optional and
190
defaults to the committer identity; if specified, it must be
191
stuck to the option without a space. `--no-gpg-sign` is useful to
192
countermand both `commit.gpgSign` configuration variable, and
193
earlier `--gpg-sign`.
194
195
---continue::
196
--r::
197
---resolved::
195
+`--continue`::
196
+`-r`::
197
+`--resolved`::
198
After a patch failure (e.g. attempting to apply
199
conflicting patch), the user has applied it by hand and
200
the index file stores the result of the application.
@@ -202,36 +202,36 @@ applying.
202
extracted from the e-mail message and the current index
203
file, and continue.
204
205
---resolvemsg=<msg>::
206
- When a patch failure occurs, <msg> will be printed
205
+`--resolvemsg=<msg>`::
206
+ When a patch failure occurs, _<msg>_ will be printed
207
to the screen before exiting. This overrides the
208
standard message informing you to use `--continue`
209
or `--skip` to handle the failure. This is solely
210
for internal use between linkgit:git-rebase[1] and
211
linkgit:git-am[1].
212
213
---abort::
213
+`--abort`::
214
Restore the original branch and abort the patching operation.
215
Revert the contents of files involved in the am operation to their
216
pre-am state.
217
218
---quit::
219
- Abort the patching operation but keep HEAD and the index
218
+`--quit`::
219
+ Abort the patching operation but keep `HEAD` and the index
220
untouched.
221
222
---retry::
222
+`--retry`::
223
Try to apply the last conflicting patch again. This is generally
224
only useful for passing extra options to the retry attempt
225
(e.g., `--3way`), since otherwise you'll just see the same
226
failure again.
227
228
---show-current-patch[=(diff|raw)]::
228
+`--show-current-patch[=(diff|raw)]`::
229
Show the message at which linkgit:git-am[1] has stopped due to
230
conflicts. If `raw` is specified, show the raw contents of
231
the e-mail message; if `diff`, show the diff portion only.
232
Defaults to `raw`.
233
234
---allow-empty::
234
+`--allow-empty`::
235
After a patch failure on an input e-mail message lacking a patch,
236
create an empty commit with the contents of the e-mail message
237
as its log message.
@@ -278,11 +278,11 @@ operation is finished, so if you decide to start over from scratch,
278
run `git am --abort` before running the command with mailbox
279
names.
280
281
-Before any patches are applied, ORIG_HEAD is set to the tip of the
281
+Before any patches are applied, `ORIG_HEAD` is set to the tip of the
282
current branch. This is useful if you have problems with multiple
283
commits, like running linkgit:git-am[1] on the wrong branch or an error
284
in the commits that is more easily fixed by changing the mailbox (e.g.
285
-errors in the "From:" lines).
285
+errors in the `From:` lines).
286
287
[[caveats]]
288
CAVEATS