diff options
author | Jeff King <peff@peff.net> | 2023-10-20 06:15:24 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-10-20 14:31:39 -0700 |
commit | 3ec6167567d0e1e03a728a64efa9848310d172ab (patch) | |
tree | 69776656b2426ae366ba85e7914d41d2620a1f11 /Documentation/git-send-email.txt | |
parent | 637e8944a13af5eae2dcaef99d4d84645f2b60ac (diff) | |
download | git-3ec6167567d0e1e03a728a64efa9848310d172ab.tar.gz |
send-email: handle to/cc/bcc from --compose message
If the user writes a message via --compose, send-email will pick up
various headers like "From", "Subject", etc and use them for other
patches as if they were specified on the command-line. But we don't
handle "To", "Cc", or "Bcc" this way; we just tell the user "those
aren't interpeted yet" and ignore them.
But it seems like an obvious thing to want, especially as the same
feature exists when the cover letter is generated separately by
format-patch. There it is gated behind the --to-cover option, but I
don't think we'd need the same control here; since we generate the
--compose template ourselves based on the existing input, if the user
leaves the lines unchanged then the behavior remains the same.
So let's fill in the implementation; like those other headers we already
handle, we just need to assign to the initial_* variables. The only
difference in this case is that they are arrays, so we'll feed them
through parse_address_line() to split them (just like we would when
reading a single string via prompting).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-send-email.txt')
-rw-r--r-- | Documentation/git-send-email.txt | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt index 021276329c..f4d7166275 100644 --- a/Documentation/git-send-email.txt +++ b/Documentation/git-send-email.txt @@ -68,11 +68,12 @@ This option may be specified multiple times. Invoke a text editor (see GIT_EDITOR in linkgit:git-var[1]) to edit an introductory message for the patch series. + -When `--compose` is used, git send-email will use the From, Subject, -Reply-To, and In-Reply-To headers specified in the message. If the body -of the message (what you type after the headers and a blank line) only -contains blank (or Git: prefixed) lines, the summary won't be sent, but -the headers mentioned above will be used unless they are removed. +When `--compose` is used, git send-email will use the From, To, Cc, Bcc, +Subject, Reply-To, and In-Reply-To headers specified in the message. If +the body of the message (what you type after the headers and a blank +line) only contains blank (or Git: prefixed) lines, the summary won't be +sent, but the headers mentioned above will be used unless they are +removed. + Missing From or In-Reply-To headers will be prompted for. + |