Re: [PATCH 2/3] format-patch: teach `--header-cmd`
- From
Kristoffer Haugsbakk <code@khaugsbakk.name>
- Date
- Mar 12, 2024, 08:13 UTC
- Message-ID
- <d677ed9c-0f93-4fb9-a878-62711f9d6fdf@app.fastmail.com>
- In-Reply-To
- <53ea3745-205b-40c0-a4c5-9be26d9b88bf@gmail.com>
On Mon, Mar 11, 2024, at 22:29, Jean-Noël Avila wrote:
Show 17 quoted lines
>> +--[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. >
Thanks, I’ll do that in the next version.
Show 22 quoted lines
>> ++ >> +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.
Thanks for reviewing!
-- Kristoffer Haugsbakk