git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] send-email: do not leave an empty CC: line if no cc is present.
@ 2007-04-17  4:43 Junio C Hamano
  0 siblings, 0 replies; only message in thread
From: Junio C Hamano @ 2007-04-17  4:43 UTC (permalink / raw)
  To: git

Signed-off-by: Junio C Hamano <junkio@cox.net>
---

 * I've almost never used send-email myself, but I decided that
   I should eat somebody's dog food I inherited.  Once I got
   annoyed enough, I may end up rewriting large portions of it,
   perhaps.

 git-send-email.perl |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/git-send-email.perl b/git-send-email.perl
index 1278fcb..d6b1548 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
-- 
1.5.1.1.821.g88bdb

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-04-17  4:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-17  4:43 [PATCH] send-email: do not leave an empty CC: line if no cc is present Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).