]> git.ipfire.org Git - thirdparty/git.git/commitdiff
doc: convert git-am synopsis and options to new style
authorJean-Noël Avila <jn.avila@free.fr>
Mon, 25 May 2026 10:28:25 +0000 (10:28 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 25 May 2026 11:05:44 +0000 (20:05 +0900)
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>
Documentation/config/am.adoc
Documentation/format-patch-caveats.adoc
Documentation/format-patch-end-of-commit-message.adoc
Documentation/git-am.adoc

index e9561e12d7467e2058c1334122aa7c33e3e8a170..250e6b5047365dd0448ceec76decb75cd23c513b 100644 (file)
@@ -1,11 +1,11 @@
-am.keepcr::
+`am.keepcr`::
        If true, linkgit:git-am[1] will call linkgit:git-mailsplit[1]
        for patches in mbox format with parameter `--keep-cr`. In this
        case linkgit:git-mailsplit[1] will
        not remove `\r` from lines ending with `\r\n`. Can be overridden
        by giving `--no-keep-cr` from the command line.
 
-am.threeWay::
+`am.threeWay`::
        By default, linkgit:git-am[1] will fail if the patch does not
        apply cleanly. When set to true, this setting tells
        linkgit:git-am[1] to fall back on 3-way merge if the patch
@@ -13,7 +13,7 @@ am.threeWay::
        have those blobs available locally (equivalent to giving the
        `--3way` option from the command line). Defaults to `false`.
 
-am.messageId::
+`am.messageId`::
        Add a `Message-ID` trailer based on the email header to the
        commit when using linkgit:git-am[1] (see
        linkgit:git-interpret-trailers[1]). See also the `--message-id`
index 807a65b885b09a78048476aa94e29ed02efe2973..133e4757e7946ceb33492d4171356cf49d2172a8 100644 (file)
@@ -28,6 +28,6 @@ repositories. This goes to show that this behavior does not only impact
 email workflows.
 
 Given these limitations, one might be tempted to use a general-purpose
-utility like patch(1) instead. However, patch(1) will not only look for
+utility like `patch`(1) instead. However, `patch`(1) will not only look for
 unindented diffs (like linkgit:git-am[1]) but will try to apply indented
 diffs as well.
index ec1ef79f5e33081b0724b1839730d1183e14f509..a1a624d2ac5bc22b9bd1554fa71ce92a14e97c0c 100644 (file)
@@ -1,8 +1,8 @@
 Any line that is of the form:
 
 * three-dashes and end-of-line, or
-* a line that begins with "diff -", or
-* a line that begins with "Index: "
+* a line that begins with `diff -`, or
+* a line that begins with `Index: `
 
 is taken as the beginning of a patch, and the commit log message
 is terminated before the first occurrence of such a line.
index ac65852918f3ee2725d1ba2faf2082f68456a9b2..28adf4cf6566519f0f5985602c5769c5d749044b 100644 (file)
@@ -8,17 +8,17 @@ git-am - Apply a series of patches from a mailbox
 
 SYNOPSIS
 --------
-[verse]
-'git am' [--signoff] [--keep] [--[no-]keep-cr] [--[no-]utf8] [--[no-]verify]
+[synopsis]
+git am [--signoff] [--keep] [--[no-]keep-cr] [--[no-]utf8] [--[no-]verify]
         [--[no-]3way] [--interactive] [--committer-date-is-author-date]
         [--ignore-date] [--ignore-space-change | --ignore-whitespace]
         [--whitespace=<action>] [-C<n>] [-p<n>] [--directory=<dir>]
         [--exclude=<path>] [--include=<path>] [--reject] [-q | --quiet]
-        [--[no-]scissors] [-S[<keyid>]] [--patch-format=<format>]
+        [--[no-]scissors] [-S[<key-id>]] [--patch-format=<format>]
         [--quoted-cr=<action>]
         [--empty=(stop|drop|keep)]
         [(<mbox> | <Maildir>)...]
-'git am' (--continue | --skip | --abort | --quit | --retry | --show-current-patch[=(diff|raw)] | --allow-empty)
+git am (--continue | --skip | --abort | --quit | --retry | --show-current-patch[=(diff|raw)] | --allow-empty)
 
 DESCRIPTION
 -----------
@@ -30,45 +30,45 @@ history without merges.
 
 OPTIONS
 -------
-(<mbox>|<Maildir>)...::
+`(<mbox>|<Maildir>)...`::
        The list of mailbox files to read patches from. If you do not
        supply this argument, the command reads from the standard input.
        If you supply directories, they will be treated as Maildirs.
 
--s::
---signoff::
+`-s`::
+`--signoff`::
        Add a `Signed-off-by` trailer to the commit message (see
        linkgit:git-interpret-trailers[1]), using the committer identity
        of yourself.  See the signoff option in linkgit:git-commit[1]
        for more information.
 
--k::
---keep::
+`-k`::
+`--keep`::
        Pass `-k` flag to linkgit:git-mailinfo[1].
 
---keep-non-patch::
+`--keep-non-patch`::
        Pass `-b` flag to linkgit:git-mailinfo[1].
 
---keep-cr::
---no-keep-cr::
+`--keep-cr`::
+`--no-keep-cr`::
        With `--keep-cr`, call linkgit:git-mailsplit[1]
        with the same option, to prevent it from stripping CR at the end of
        lines. `am.keepcr` configuration variable can be used to specify the
        default behaviour.  `--no-keep-cr` is useful to override `am.keepcr`.
 
--c::
---scissors::
+`-c`::
+`--scissors`::
        Remove everything in body before a scissors line (see
        linkgit:git-mailinfo[1]). Can be activated by default using
        the `mailinfo.scissors` configuration variable.
 
---no-scissors::
+`--no-scissors`::
        Ignore scissors lines (see linkgit:git-mailinfo[1]).
 
---quoted-cr=<action>::
+`--quoted-cr=<action>`::
        This flag will be passed down to linkgit:git-mailinfo[1].
 
---empty=(drop|keep|stop)::
+`--empty=(drop|keep|stop)`::
        How to handle an e-mail message lacking a patch:
 +
 --
@@ -82,23 +82,23 @@ OPTIONS
        session. This is the default behavior.
 --
 
--m::
---message-id::
+`-m`::
+`--message-id`::
        Pass the `-m` flag to linkgit:git-mailinfo[1],
        so that the `Message-ID` header is added to the commit message.
        The `am.messageid` configuration variable can be used to specify
        the default behaviour.
 
---no-message-id::
+`--no-message-id`::
        Do not add the Message-ID header to the commit message.
        `--no-message-id` is useful to override `am.messageid`.
 
--q::
---quiet::
+`-q`::
+`--quiet`::
        Be quiet. Only print error messages.
 
--u::
---utf8::
+`-u`::
+`--utf8`::
        Pass `-u` flag to linkgit:git-mailinfo[1].
        The proposed commit log message taken from the e-mail
        is re-coded into UTF-8 encoding (configuration variable
@@ -108,57 +108,57 @@ OPTIONS
 This was optional in prior versions of git, but now it is the
 default.   You can use `--no-utf8` to override this.
 
---no-utf8::
+`--no-utf8`::
        Pass `-n` flag to linkgit:git-mailinfo[1].
 
--3::
---3way::
---no-3way::
+`-3`::
+`--3way`::
+`--no-3way`::
        When the patch does not apply cleanly, fall back on
        3-way merge if the patch records the identity of blobs
        it is supposed to apply to and we have those blobs
        available locally. `--no-3way` can be used to override
-       am.threeWay configuration variable. For more information,
-       see am.threeWay in linkgit:git-config[1].
+       `am.threeWay` configuration variable. For more information,
+       see `am.threeWay` in linkgit:git-config[1].
 
 include::rerere-options.adoc[]
 
---ignore-space-change::
---ignore-whitespace::
---whitespace=<action>::
--C<n>::
--p<n>::
---directory=<dir>::
---exclude=<path>::
---include=<path>::
---reject::
+`--ignore-space-change`::
+`--ignore-whitespace`::
+`--whitespace=<action>`::
+`-C<n>`::
+`-p<n>`::
+`--directory=<dir>`::
+`--exclude=<path>`::
+`--include=<path>`::
+`--reject`::
        These flags are passed to the linkgit:git-apply[1] program that
        applies the patch.
 +
-Valid <action> for the `--whitespace` option are:
+Valid _<action>_ for the `--whitespace` option are:
 `nowarn`, `warn`, `fix`, `error`, and `error-all`.
 
---patch-format::
+`--patch-format`::
        By default the command will try to detect the patch format
        automatically. This option allows the user to bypass the automatic
        detection and specify the patch format that the patch(es) should be
        interpreted as. Valid formats are mbox, mboxrd,
        stgit, stgit-series, and hg.
 
--i::
---interactive::
+`-i`::
+`--interactive`::
        Run interactively.
 
---verify::
--n::
---no-verify::
+`--verify`::
+`-n`::
+`--no-verify`::
        Run the `pre-applypatch` and `applypatch-msg` hooks. This is the
        default. Skip these hooks with `-n` or `--no-verify`. See also
        linkgit:githooks[5].
 +
 Note that `post-applypatch` cannot be skipped.
 
---committer-date-is-author-date::
+`--committer-date-is-author-date`::
        By default the command records the date from the e-mail
        message as the commit author date, and uses the time of
        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
 older (in terms of the commit date) than the oldest patch you are
 applying.
 
---ignore-date::
+`--ignore-date`::
        By default the command records the date from the e-mail
        message as the commit author date, and uses the time of
        commit creation as the committer date. This allows the
        user to lie about the author date by using the same
        value as the committer date.
 
---skip::
+`--skip`::
        Skip the current patch.  This is only meaningful when
        restarting an aborted patch.
 
--S[<keyid>]::
---gpg-sign[=<keyid>]::
---no-gpg-sign::
-       GPG-sign commits. The `keyid` argument is optional and
+`-S[<key-id>]`::
+`--gpg-sign[=<key-id>]`::
+`--no-gpg-sign`::
+       GPG-sign commits. The _<key-id>_ is optional and
        defaults to the committer identity; if specified, it must be
        stuck to the option without a space. `--no-gpg-sign` is useful to
        countermand both `commit.gpgSign` configuration variable, and
        earlier `--gpg-sign`.
 
---continue::
--r::
---resolved::
+`--continue`::
+`-r`::
+`--resolved`::
        After a patch failure (e.g. attempting to apply
        conflicting patch), the user has applied it by hand and
        the index file stores the result of the application.
@@ -202,36 +202,36 @@ applying.
        extracted from the e-mail message and the current index
        file, and continue.
 
---resolvemsg=<msg>::
-       When a patch failure occurs, <msg> will be printed
+`--resolvemsg=<msg>`::
+       When a patch failure occurs, _<msg>_ will be printed
        to the screen before exiting.  This overrides the
        standard message informing you to use `--continue`
        or `--skip` to handle the failure.  This is solely
        for internal use between linkgit:git-rebase[1] and
        linkgit:git-am[1].
 
---abort::
+`--abort`::
        Restore the original branch and abort the patching operation.
        Revert the contents of files involved in the am operation to their
        pre-am state.
 
---quit::
-       Abort the patching operation but keep HEAD and the index
+`--quit`::
+       Abort the patching operation but keep `HEAD` and the index
        untouched.
 
---retry::
+`--retry`::
        Try to apply the last conflicting patch again. This is generally
        only useful for passing extra options to the retry attempt
        (e.g., `--3way`), since otherwise you'll just see the same
        failure again.
 
---show-current-patch[=(diff|raw)]::
+`--show-current-patch[=(diff|raw)]`::
        Show the message at which linkgit:git-am[1] has stopped due to
        conflicts.  If `raw` is specified, show the raw contents of
        the e-mail message; if `diff`, show the diff portion only.
        Defaults to `raw`.
 
---allow-empty::
+`--allow-empty`::
        After a patch failure on an input e-mail message lacking a patch,
        create an empty commit with the contents of the e-mail message
        as its log message.
@@ -278,11 +278,11 @@ operation is finished, so if you decide to start over from scratch,
 run `git am --abort` before running the command with mailbox
 names.
 
-Before any patches are applied, ORIG_HEAD is set to the tip of the
+Before any patches are applied, `ORIG_HEAD` is set to the tip of the
 current branch.  This is useful if you have problems with multiple
 commits, like running linkgit:git-am[1] on the wrong branch or an error
 in the commits that is more easily fixed by changing the mailbox (e.g.
-errors in the "From:" lines).
+errors in the `From:` lines).
 
 [[caveats]]
 CAVEATS