From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37D7F30DECB for ; Sun, 17 May 2026 20:27:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779049626; cv=none; b=dqLzBWEWmheOrAXcTYno1QqiQLTQ5+NsDjO1bdxHt1UN3PVT/DYUkXRDxX7IRSSlA1/BHuiWPJe9y2vR8FB0PTVY3DnyvIJP0ETkWKtf1dHHx2CrO3Zo7uC4It14eHh1HEkQG2QOXgUxwhCLjdNOrbRtb4DUdB+mJqVQySmRfBI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779049626; c=relaxed/simple; bh=fNqWmpPA4Acog1H0BvG2VAdsaxiVua2/DlTMWJh928s=; h=Message-Id:In-Reply-To:References:From:Date:Subject:MIME-Version: Content-Type:To:Cc; b=Uw+amwoaJ9kngNEqgah/8MCvppmO/2bGuEca1VaPar86mLA787nXw5G7yysBQ9kKdqoded34xBAhqlkFJYb5ud2FI58A/WDEwH2DX6z8e24j/21bjkbhrg2LCmmDfqYZOCmTJ7U+/JPfoY06HD+7TU75cTC6WlEc3Aw1a2G0bMc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=OPrrqXts; arc=none smtp.client-ip=209.85.222.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OPrrqXts" Received: by mail-qk1-f172.google.com with SMTP id af79cd13be357-90d2acb9936so179130785a.0 for ; Sun, 17 May 2026 13:27:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779049623; x=1779654423; darn=vger.kernel.org; h=cc:to:fcc:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=rrGOQ/a4CXudMvpeMrpSNuSC1VxO1PRc3WjkKtna3T0=; b=OPrrqXtsxlp63dOfkL7YBtxhblswG2xm9dZhI+mWQbrUq0tqmHP3InPUH8+W8rbuPm ys/jFqp/e+dTdDok81Ri82oNJzfE50mmOiSjoe94pNa+SMzyPV9/sqyTFrJC5QI/Mgy2 fy2DZ1XkhGnD2o23kEeAp3SxgofKAJYS2vmxKgnDAh0Zgd/QRPYuxJ6fTm5ZwQXx9euC V9E6iHVm9Ate//4IvZ7Sw+p9yXneOiZnxNUy3Ll6ouMO1SlyDYcHO2Z2pVLwTq7fbiX3 O4zFXSl9x9I/DNY9+qaLJeowX6Ox3P4B8eFh7Bs9AABdkWi2rJA2w6UAqzau6JmHSdyg BRbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779049623; x=1779654423; h=cc:to:fcc:content-transfer-encoding:mime-version:subject:date:from :references:in-reply-to:message-id:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=rrGOQ/a4CXudMvpeMrpSNuSC1VxO1PRc3WjkKtna3T0=; b=N7PqL9883g7hdcI8SAFDJlFpJwBQLGPUNKT0VQl04g2qmLdvY2l7B0F8jf//msd+Km ACNjEesuJ7nu5n08P8G5XQRivjVtIVKhmZFras95gBlB36B8mSm7YFpbtL0SP2tXf9fm agb5htI4os/rnI30pXYlEcVSi95eBx44wXz0/5arO8ddE8zRnr+HkqtE4hhBpB508v6q z6ZlvwWlbzGpY0wD2L58JH3mT+vljkfexCVxGlkpAfjqJrR7YljLBQR6x6J8gB/SQj9n AqPDvi9p/SxEbCdZTp6H6oTDFVcqfXMM1PP5Vi09h32bFK4tGFkfq0rCiMXTUhRYvUdO KGGA== X-Gm-Message-State: AOJu0Yx4K99C4Ri6hUlErElRzI7nZBvJ1JDgE1nRv755p0IjTnkAY1/V JYTF6Gmf0p72ZFX7HvkMiM4YpEtC+3bRJINCbamfrs34DtBGKaqxWvQIsKtH2Q== X-Gm-Gg: Acq92OHUaSWuSggo4/4cLN08FK6yyDI13aaEB4A51Imf8kq7iBznQPkZGiwxOVm3naZ vZmuG7x10Bhg+pDkUh3jqB8zw/Fl/bqhnFGTE3EUbhMGXatGUwdiCt3olHf3ouqXzbT2Q0Zh9Tt Byfl1+sg6p0bzTQcbgh4gyfeouPzuT1b093iszeLRU4t3VEQHNmZFA25V0ltc85LqcAW//+tB/j AGdcKTPbcmNSUAz/aKlglZl/G4IsDrGW4wp2ZBRsw4oo4Io5hBV/aqF10puIoyUKkJ8TUZjatn3 1Ay7eM/qAKUmFd8cCGswVnSILKP09Ofx64lFpcoLbwxREyDbnX5mXlWrsLsuDAw4zprJIuHSDMJ lBnbG8ULWb4UqrrPLFA+gLdl2rd+lAV0ox/t9GSbDW/doVBX3YhRx8tfnttBdqpASXkoZhl3eFR 99jHZKc8NDufv/IJ4dUTF5qW0V2u8evUxZkGORhA== X-Received: by 2002:a05:620a:199b:b0:8ee:f43a:bb6b with SMTP id af79cd13be357-911ccd8f015mr2019465385a.10.1779049622841; Sun, 17 May 2026 13:27:02 -0700 (PDT) Received: from [127.0.0.1] ([64.236.134.161]) by smtp.gmail.com with ESMTPSA id af79cd13be357-910bd620fbcsm1286934885a.42.2026.05.17.13.27.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2026 13:27:01 -0700 (PDT) Message-Id: <4ab60a95f4847bcfee82292ff4ac47424e5aa147.1779049615.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "=?UTF-8?q?Jean-No=C3=ABl=20Avila?= via GitGitGadget" Date: Sun, 17 May 2026 20:26:53 +0000 Subject: [PATCH 3/5] doc: convert git-am synopsis and options to new style Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fcc: Sent To: git@vger.kernel.org Cc: =?UTF-8?Q?Jean-No=C3=ABl?= Avila , =?UTF-8?q?Jean-No=C3=ABl=20Avila?= From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= 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 --- Documentation/config/am.adoc | 6 +- Documentation/format-patch-caveats.adoc | 2 +- .../format-patch-end-of-commit-message.adoc | 4 +- Documentation/git-am.adoc | 132 +++++++++--------- 4 files changed, 72 insertions(+), 72 deletions(-) diff --git a/Documentation/config/am.adoc b/Documentation/config/am.adoc index e9561e12d7..250e6b5047 100644 --- a/Documentation/config/am.adoc +++ b/Documentation/config/am.adoc @@ -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` diff --git a/Documentation/format-patch-caveats.adoc b/Documentation/format-patch-caveats.adoc index 807a65b885..133e4757e7 100644 --- a/Documentation/format-patch-caveats.adoc +++ b/Documentation/format-patch-caveats.adoc @@ -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. diff --git a/Documentation/format-patch-end-of-commit-message.adoc b/Documentation/format-patch-end-of-commit-message.adoc index ec1ef79f5e..a1a624d2ac 100644 --- a/Documentation/format-patch-end-of-commit-message.adoc +++ b/Documentation/format-patch-end-of-commit-message.adoc @@ -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. diff --git a/Documentation/git-am.adoc b/Documentation/git-am.adoc index ac65852918..28adf4cf65 100644 --- a/Documentation/git-am.adoc +++ b/Documentation/git-am.adoc @@ -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=] [-C] [-p] [--directory=] [--exclude=] [--include=] [--reject] [-q | --quiet] - [--[no-]scissors] [-S[]] [--patch-format=] + [--[no-]scissors] [-S[]] [--patch-format=] [--quoted-cr=] [--empty=(stop|drop|keep)] [( | )...] -'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 ------- -(|)...:: +`(|)...`:: 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=:: +`--quoted-cr=`:: 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=:: --C:: --p:: ---directory=:: ---exclude=:: ---include=:: ---reject:: +`--ignore-space-change`:: +`--ignore-whitespace`:: +`--whitespace=`:: +`-C`:: +`-p`:: +`--directory=`:: +`--exclude=`:: +`--include=`:: +`--reject`:: These flags are passed to the linkgit:git-apply[1] program that applies the patch. + -Valid for the `--whitespace` option are: +Valid __ 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[]:: ---gpg-sign[=]:: ---no-gpg-sign:: - GPG-sign commits. The `keyid` argument is optional and +`-S[]`:: +`--gpg-sign[=]`:: +`--no-gpg-sign`:: + GPG-sign commits. The __ 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=:: - When a patch failure occurs, will be printed +`--resolvemsg=`:: + When a patch failure occurs, __ 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 -- gitgitgadget