{"thread":{"id":"7707","subject":"[PATCH] send-email: do not leave an empty CC: line if no cc is present.","startedAt":"2007-04-17T04:43:21Z","lastAt":"2007-04-17T04:43:21Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"39600","messageId":"11767850012084-git-send-email-junkio@cox.net","threadId":"7707","inReplyTo":null,"subject":"[PATCH] send-email: do not leave an empty CC: line if no cc is present.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-17T04:43:21Z","receivedAt":"2007-04-17T04:43:21Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Signed-off-by: Junio C Hamano <junkio@cox.net>\n---\n\n * I've almost never used send-email myself, but I decided that\n   I should eat somebody's dog food I inherited.  Once I got\n   annoyed enough, I may end up rewriting large portions of it,\n   perhaps.\n\n git-send-email.perl |    7 +++++--\n 1 files changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 1278fcb..d6b1548 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -446,9 +446,12 @@ sub send_message\n \t\tmy ($name, $addr) = ($from =~ /^(.*?)(\\s+<.*)/);\n \t\t$from = \"\\\"$name\\\"$addr\";\n \t}\n+\tmy $ccline = \"\";\n+\tif ($cc ne '') {\n+\t\t$ccline = \"\\nCc: $cc\";\n+\t}\n \tmy $header = \"From: $from\n-To: $to\n-Cc: $cc\n+To: $to${ccline}\n Subject: $subject\n Date: $date\n Message-Id: $message_id\n-- \n1.5.1.1.821.g88bdb\n"}]}