summaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2017-02-20 11:44:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-02-27 18:02:55 (GMT)
commit9d3343961b845c02f9a3e0e9535492687c404b17 (patch)
tree76151894d9c4cf32cc00f4ee23e39fc08ddda3b1 /git-send-email.perl
parent3b9e3c2cede15057af3ff8076c45ad5f33829436 (diff)
downloadgit-9d3343961b845c02f9a3e0e9535492687c404b17.zip
git-9d3343961b845c02f9a3e0e9535492687c404b17.tar.gz
git-9d3343961b845c02f9a3e0e9535492687c404b17.tar.bz2
send-email: only allow one address per body tag
Adding comments after a tag in the body is a common practise (e.g. in the Linux kernel) and git-send-email has been supporting this for years by removing any trailing cruft after the address. After some recent changes, any trailing comment is now instead appended to the recipient name (with some random white space inserted) resulting in undesirable noise in the headers, for example: CC: "# 3 . 3 . x : 1b9508f : sched : Rate-limit newidle" <stable@vger.kernel.org> Revert to the earlier behaviour of discarding anything after the (first) address in a tag while parsing the body. Note that multiple addresses after are still allowed after a command line switch (and in a CC header field). Also note that --suppress-cc=self was never honoured when using multiple addresses in a tag. Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index da81be4..2bc656e 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1545,7 +1545,7 @@ foreach my $t (@files) {
# Now parse the message body
while(<$fh>) {
$message .= $_;
- if (/^(Signed-off-by|Cc): (.*)$/i) {
+ if (/^(Signed-off-by|Cc): ([^>]*>?)/i) {
chomp;
my ($what, $c) = ($1, $2);
chomp $c;