From: "Jean-Noël Avila" <avila.jn@gmail.com>
To: Kristoffer Haugsbakk <code@khaugsbakk.name>, git@vger.kernel.org
Subject: Re: [PATCH 2/3] format-patch: teach `--header-cmd`
Date: Mon, 11 Mar 2024 22:29:53 +0100 [thread overview]
Message-ID: <53ea3745-205b-40c0-a4c5-9be26d9b88bf@gmail.com> (raw)
In-Reply-To: <f405a0140b5655bc66a0a7a603517a421d7669cf.1709841147.git.code@khaugsbakk.name>
Le 07/03/2024 à 20:59, Kristoffer Haugsbakk a écrit :
>
> +format.headerCmd::
> + Command to run for each patch that should output RFC 2822 email
> + headers. Has access to some information per patch via
> + environment variables. See linkgit:git-format-patch[1].
> +
> format.to::
> format.cc::
> Additional recipients to include in a patch to be submitted
> diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
> index 728bb3821c1..41c344902e9 100644
> --- a/Documentation/git-format-patch.txt
> +++ b/Documentation/git-format-patch.txt
> @@ -303,6 +303,32 @@ feeding the result to `git send-email`.
> `Cc:`, and custom) headers added so far from config or command
> line.
>
> +--[no-]header-cmd=<cmd>::
> + Run _<cmd>_ for each patch. _<cmd>_ should output valid RFC 2822
> + email headers. This can also be configured with
> + the configuration variable `format.headerCmd`. Can be turned off
> + with `--no-header-cmd`. This works independently of
> + `--[no-]add-header`.
> ++
> +_<cmd>_ has access to these environment variables:
> ++
> + GIT_FP_HEADER_CMD_VERSION
Better use a nested description list like this:
GIT_FP_HEADER_CMD_VERSION;;
The version of this API. Currently `1`. _<cmd>_ may return exit code
`2` in order to signal that it does not support the given version.
> ++
> +The version of this API. Currently `1`. _<cmd>_ may return exit code
> +`2` in order to signal that it does not support the given version.
> ++
> + GIT_FP_HEADER_CMD_HASH
> ++
> +The hash of the commit corresponding to the current patch. Not set if
> +the current patch is the cover letter.
> ++
> + GIT_FP_HEADER_CMD_COUNT
> ++
> +The current patch count. Increments for each patch.
> ++
> +`git format-patch` will error out if _<cmd>_ returns a non-zero exit
> +code.
> +
> --[no-]cover-letter::
> In addition to the patches, generate a cover letter file
> containing the branch description, shortlog and the overall diffstat. You can
Overall, thank you for correctly marking up placeholders and options.
next prev parent reply other threads:[~2024-03-11 21:29 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-07 19:59 [PATCH 0/3] format-patch: teach `--header-cmd` Kristoffer Haugsbakk
2024-03-07 19:59 ` [PATCH 1/3] log-tree: take ownership of pointer Kristoffer Haugsbakk
2024-03-12 9:29 ` Jeff King
2024-03-12 17:43 ` Kristoffer Haugsbakk
2024-03-13 6:54 ` Jeff King
2024-03-13 17:49 ` Kristoffer Haugsbakk
2024-03-07 19:59 ` [PATCH 2/3] format-patch: teach `--header-cmd` Kristoffer Haugsbakk
2024-03-08 18:30 ` Kristoffer Haugsbakk
2024-03-11 21:29 ` Jean-Noël Avila [this message]
2024-03-12 8:13 ` Kristoffer Haugsbakk
2024-03-07 19:59 ` [PATCH 3/3] format-patch: check if header output looks valid Kristoffer Haugsbakk
2024-03-19 18:35 ` [PATCH v2 0/3] format-patch: teach `--header-cmd` Kristoffer Haugsbakk
2024-03-19 18:35 ` [PATCH v2 1/3] revision: add a per-email field to rev-info Kristoffer Haugsbakk
2024-03-19 21:29 ` Jeff King
2024-03-19 21:41 ` Kristoffer Haugsbakk
2024-03-20 0:25 ` Jeff King
2024-03-20 0:27 ` [PATCH 1/6] shortlog: stop setting pp.print_email_subject Jeff King
2024-03-20 0:28 ` [PATCH 2/6] pretty: split oneline and email subject printing Jeff King
2024-03-22 22:00 ` Kristoffer Haugsbakk
2024-03-20 0:30 ` [PATCH 3/6] pretty: drop print_email_subject flag Jeff King
2024-03-20 0:31 ` [PATCH 4/6] log: do not set up extra_headers for non-email formats Jeff King
2024-03-22 22:04 ` Kristoffer Haugsbakk
2024-03-20 0:35 ` [PATCH 5/6] format-patch: return an allocated string from log_write_email_headers() Jeff King
2024-03-22 22:06 ` Kristoffer Haugsbakk
2024-03-20 0:35 ` [PATCH 6/6] format-patch: simplify after-subject MIME header handling Jeff King
2024-03-22 22:08 ` Kristoffer Haugsbakk
2024-03-20 0:43 ` [PATCH v2 1/3] revision: add a per-email field to rev-info Jeff King
2024-03-22 22:31 ` Kristoffer Haugsbakk
2024-03-22 9:59 ` [PATCH 7/6] format-patch: fix leak of empty header string Jeff King
2024-03-22 10:03 ` Kristoffer Haugsbakk
2024-03-22 16:50 ` Junio C Hamano
2024-03-22 22:16 ` Kristoffer Haugsbakk
2024-03-19 18:35 ` [PATCH v2 2/3] format-patch: teach `--header-cmd` Kristoffer Haugsbakk
2024-03-19 18:35 ` [PATCH v2 3/3] format-patch: check if header output looks valid Kristoffer Haugsbakk
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=53ea3745-205b-40c0-a4c5-9be26d9b88bf@gmail.com \
--to=avila.jn@gmail.com \
--cc=code@khaugsbakk.name \
--cc=git@vger.kernel.org \
/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).