From f06a6a493a14ae632cdd3d04af04301769f4ef71 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 16 Apr 2007 16:51:47 -0700 Subject: [PATCH] send-email: do not leave an empty CC: line if no cc is present. Signed-off-by: Junio C Hamano --- git-send-email.perl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index 1278fcba4..d6b15480d 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -446,9 +446,12 @@ sub send_message my ($name, $addr) = ($from =~ /^(.*?)(\s+<.*)/); $from = "\"$name\"$addr"; } + my $ccline = ""; + if ($cc ne '') { + $ccline = "\nCc: $cc"; + } my $header = "From: $from -To: $to -Cc: $cc +To: $to${ccline} Subject: $subject Date: $date Message-Id: $message_id -- 2.30.2