From: Kristoffer Haugsbakk Date: Tue, 12 Mar 2024 08:13:40 GMT Subject: Re: [PATCH 2/3] format-patch: teach `--header-cmd` Message-ID: In-Reply-To: <53ea3745-205b-40c0-a4c5-9be26d9b88bf@gmail.com> On Mon, Mar 11, 2024, at 22:29, Jean-Noël Avila wrote: >> +--[no-]header-cmd=:: >> + Run __ for each patch. __ 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`. >> ++ >> +__ 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`. __ 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. >> ++ >> +The version of this API. Currently `1`. __ 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 __ 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