Skip to content

Commit 920d0c2

Browse files
committed
Merge branch 'kh/doc-am-xref' into next
Doc update. * kh/doc-am-xref: doc: am: fill out hook discussion doc: am: add missing config am.messageId doc: am: say that --message-id adds a trailer doc: am: normalize git(1) command links
2 parents 4d702cb + b10e0cb commit 920d0c2

2 files changed

Lines changed: 47 additions & 35 deletions

File tree

Documentation/config/am.adoc

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
am.keepcr::
2-
If true, git-am will call git-mailsplit for patches in mbox format
3-
with parameter `--keep-cr`. In this case git-mailsplit will
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
45
not remove `\r` from lines ending with `\r\n`. Can be overridden
56
by giving `--no-keep-cr` from the command line.
6-
See linkgit:git-am[1], linkgit:git-mailsplit[1].
77

88
am.threeWay::
9-
By default, `git am` will fail if the patch does not apply cleanly. When
10-
set to true, this setting tells `git am` to fall back on 3-way merge if
11-
the patch records the identity of blobs it is supposed to apply to and
12-
we have those blobs available locally (equivalent to giving the `--3way`
13-
option from the command line). Defaults to `false`.
14-
See linkgit:git-am[1].
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
12+
records the identity of blobs it is supposed to apply to and we
13+
have those blobs available locally (equivalent to giving the
14+
`--3way` option from the command line). Defaults to `false`.
15+
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`
20+
and `--no-message-id` options.

Documentation/git-am.adoc

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ git-am - Apply a series of patches from a mailbox
99
SYNOPSIS
1010
--------
1111
[verse]
12-
'git am' [--signoff] [--keep] [--[no-]keep-cr] [--[no-]utf8] [--no-verify]
12+
'git am' [--signoff] [--keep] [--[no-]keep-cr] [--[no-]utf8] [--[no-]verify]
1313
[--[no-]3way] [--interactive] [--committer-date-is-author-date]
1414
[--ignore-date] [--ignore-space-change | --ignore-whitespace]
1515
[--whitespace=<action>] [-C<n>] [-p<n>] [--directory=<dir>]
@@ -37,20 +37,21 @@ OPTIONS
3737

3838
-s::
3939
--signoff::
40-
Add a `Signed-off-by` trailer to the commit message, using
41-
the committer identity of yourself.
42-
See the signoff option in linkgit:git-commit[1] for more information.
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.
4344

4445
-k::
4546
--keep::
46-
Pass `-k` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]).
47+
Pass `-k` flag to linkgit:git-mailinfo[1].
4748

4849
--keep-non-patch::
49-
Pass `-b` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]).
50+
Pass `-b` flag to linkgit:git-mailinfo[1].
5051

5152
--keep-cr::
5253
--no-keep-cr::
53-
With `--keep-cr`, call 'git mailsplit' (see linkgit:git-mailsplit[1])
54+
With `--keep-cr`, call linkgit:git-mailsplit[1]
5455
with the same option, to prevent it from stripping CR at the end of
5556
lines. `am.keepcr` configuration variable can be used to specify the
5657
default behaviour. `--no-keep-cr` is useful to override `am.keepcr`.
@@ -65,7 +66,7 @@ OPTIONS
6566
Ignore scissors lines (see linkgit:git-mailinfo[1]).
6667

6768
--quoted-cr=<action>::
68-
This flag will be passed down to 'git mailinfo' (see linkgit:git-mailinfo[1]).
69+
This flag will be passed down to linkgit:git-mailinfo[1].
6970

7071
--empty=(drop|keep|stop)::
7172
How to handle an e-mail message lacking a patch:
@@ -83,10 +84,11 @@ OPTIONS
8384

8485
-m::
8586
--message-id::
86-
Pass the `-m` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]),
87-
so that the Message-ID header is added to the commit message.
88-
The `am.messageid` configuration variable can be used to specify
89-
the default behaviour.
87+
Pass the `-m` flag to linkgit:git-mailinfo[1], so that the
88+
`Message-ID` header is added as a trailer (see
89+
linkgit:git-interpret-trailers[1]). The `am.messageid`
90+
configuration variable can be used to specify the default
91+
behaviour.
9092

9193
--no-message-id::
9294
Do not add the Message-ID header to the commit message.
@@ -98,7 +100,7 @@ OPTIONS
98100

99101
-u::
100102
--utf8::
101-
Pass `-u` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]).
103+
Pass `-u` flag to linkgit:git-mailinfo[1].
102104
The proposed commit log message taken from the e-mail
103105
is re-coded into UTF-8 encoding (configuration variable
104106
`i18n.commitEncoding` can be used to specify the project's
@@ -108,8 +110,7 @@ This was optional in prior versions of git, but now it is the
108110
default. You can use `--no-utf8` to override this.
109111

110112
--no-utf8::
111-
Pass `-n` flag to 'git mailinfo' (see
112-
linkgit:git-mailinfo[1]).
113+
Pass `-n` flag to linkgit:git-mailinfo[1].
113114

114115
-3::
115116
--3way::
@@ -132,9 +133,8 @@ include::rerere-options.adoc[]
132133
--exclude=<path>::
133134
--include=<path>::
134135
--reject::
135-
These flags are passed to the 'git apply' (see linkgit:git-apply[1])
136-
program that applies
137-
the patch.
136+
These flags are passed to the linkgit:git-apply[1] program that
137+
applies the patch.
138138
+
139139
Valid <action> for the `--whitespace` option are:
140140
`nowarn`, `warn`, `fix`, `error`, and `error-all`.
@@ -150,11 +150,14 @@ Valid <action> for the `--whitespace` option are:
150150
--interactive::
151151
Run interactively.
152152

153+
--verify::
153154
-n::
154155
--no-verify::
155-
By default, the pre-applypatch and applypatch-msg hooks are run.
156-
When any of `--no-verify` or `-n` is given, these are bypassed.
157-
See also linkgit:githooks[5].
156+
Run the `pre-applypatch` and `applypatch-msg` hooks. This is the
157+
default. Skip these hooks with `-n` or `--no-verify`. See also
158+
linkgit:githooks[5].
159+
+
160+
Note that `post-applypatch` cannot be skipped.
158161

159162
--committer-date-is-author-date::
160163
By default the command records the date from the e-mail
@@ -205,7 +208,8 @@ applying.
205208
to the screen before exiting. This overrides the
206209
standard message informing you to use `--continue`
207210
or `--skip` to handle the failure. This is solely
208-
for internal use between 'git rebase' and 'git am'.
211+
for internal use between linkgit:git-rebase[1] and
212+
linkgit:git-am[1].
209213

210214
--abort::
211215
Restore the original branch and abort the patching operation.
@@ -223,7 +227,7 @@ applying.
223227
failure again.
224228

225229
--show-current-patch[=(diff|raw)]::
226-
Show the message at which `git am` has stopped due to
230+
Show the message at which linkgit:git-am[1] has stopped due to
227231
conflicts. If `raw` is specified, show the raw contents of
228232
the e-mail message; if `diff`, show the diff portion only.
229233
Defaults to `raw`.
@@ -259,7 +263,7 @@ include::format-patch-end-of-commit-message.adoc[]
259263
This means that the contents of the commit message can inadvertently
260264
interrupt the processing (see the <<caveats,CAVEATS>> section below).
261265

262-
When initially invoking `git am`, you give it the names of the mailboxes
266+
When initially invoking linkgit:git-am[1], you give it the names of the mailboxes
263267
to process. Upon seeing the first patch that does not apply, it
264268
aborts in the middle. You can recover from this in one of two ways:
265269

@@ -277,8 +281,8 @@ names.
277281

278282
Before any patches are applied, ORIG_HEAD is set to the tip of the
279283
current branch. This is useful if you have problems with multiple
280-
commits, like running 'git am' on the wrong branch or an error in the
281-
commits that is more easily fixed by changing the mailbox (e.g.
284+
commits, like running linkgit:git-am[1] on the wrong branch or an error
285+
in the commits that is more easily fixed by changing the mailbox (e.g.
282286
errors in the "From:" lines).
283287

284288
[[caveats]]
@@ -294,6 +298,8 @@ This command can run `applypatch-msg`, `pre-applypatch`,
294298
and `post-applypatch` hooks. See linkgit:githooks[5] for more
295299
information.
296300

301+
See the `--verify`/`-n`/`--no-verify` options.
302+
297303
CONFIGURATION
298304
-------------
299305

0 commit comments

Comments
 (0)