From: Dragan Simic <dsimic@manjaro.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] doc: add shortcut to "am --whitespace=<action>"
Date: Wed, 14 Feb 2024 20:01:06 +0100 [thread overview]
Message-ID: <c329d3ed43f852453ad78ba430363416@manjaro.org> (raw)
In-Reply-To: <xmqqplwyvqby.fsf@gitster.g>
On 2024-02-14 19:44, Junio C Hamano wrote:
> We refer readers of "git am --help" to "git apply --help" for many
> options that are passed through, and most of them are simple
> booleans, but --whitespace takes from a set of actions whose names
> may slip users' minds. Give a list of them in "git am --help" to
> reduce one level of redirection only to find out what they are.
>
> In the helper function to parse the available options, there was a
> helpful comment reminding the developer to update list of <action>s
> in the completion script. Mention the two documentation pages there
> as well.
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Looking to me, with one small nitpick below.
> ---
> Documentation/git-am.txt | 3 +++
> apply.c | 3 ++-
> 2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
> index 82dadbecc8..67b12f315f 100644
> --- a/Documentation/git-am.txt
> +++ b/Documentation/git-am.txt
> @@ -128,6 +128,9 @@ include::rerere-options.txt[]
> These flags are passed to the 'git apply' (see linkgit:git-apply[1])
> program that applies
> the patch.
It would be nice to, while there, move "the patch." to the line above.
> ++
> +Valid <action> for the `--whitespace` option are:
> +`nowarn`, `warn`, `fix`, `error`, and `error-all`.
>
> --patch-format::
> By default the command will try to detect the patch format
> diff --git a/apply.c b/apply.c
> index 3d69fec836..4e57831aeb 100644
> --- a/apply.c
> +++ b/apply.c
> @@ -78,7 +78,8 @@ static int parse_whitespace_option(struct
> apply_state *state, const char *option
> return 0;
> }
> /*
> - * Please update $__git_whitespacelist in git-completion.bash
> + * Please update $__git_whitespacelist in git-completion.bash,
> + * Documentation/git-apply.txt, and Documentation/git-am.txt
> * when you add new options.
> */
> return error(_("unrecognized whitespace option '%s'"), option);
next prev parent reply other threads:[~2024-02-14 19:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-14 18:44 [PATCH] doc: add shortcut to "am --whitespace=<action>" Junio C Hamano
2024-02-14 19:01 ` Dragan Simic [this message]
2024-02-14 19:03 ` Dragan Simic
2024-02-14 19:09 ` Junio C Hamano
2024-02-14 19:20 ` Dragan Simic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c329d3ed43f852453ad78ba430363416@manjaro.org \
--to=dsimic@manjaro.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).