From: "Ask Bjørn Hansen" <ask@develooper.com>
To: git@vger.kernel.org
Cc: "Ask Bjørn Hansen" <ask@develooper.com>
Subject: [PATCH] Don't print an empty Cc header in SMTP mode when there's no cc recipient defined
Date: Mon, 19 Nov 2007 02:48:14 -0800 [thread overview]
Message-ID: <1195469295-5774-1-git-send-email-ask@develooper.com> (raw)
In-Reply-To: <7voddqodhs.fsf@gitster.siamese.dyndns.org>
Signed-off-by: Ask Bjørn Hansen <ask@develooper.com>
---
There's some duplicate code between "what we do for sendmail"
and "what we do for SMTP" paths that should be fixed - this doesn't
do that, it only makes the SMTP path skip empty Cc lines...
git-send-email.perl | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index fd0a4ad..65620ab 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -651,7 +651,11 @@ X-Mailer: git-send-email $gitversion
} else {
print "Sendmail: $smtp_server ".join(' ',@sendmail_parameters)."\n";
}
- print "From: $sanitized_sender\nSubject: $subject\nCc: $cc\nTo: $to\n\n";
+ print "From: $sanitized_sender\n"
+ . "Subject: $subject\n"
+ . ($cc ? "Cc: $cc\n" : "")
+ . "To: $to\n"
+ . "\n";
if ($smtp) {
print "Result: ", $smtp->code, ' ',
($smtp->message =~ /\n([^\n]+\n)$/s), "\n";
--
1.5.3.5.561.g140d
next prev parent reply other threads:[~2007-11-19 11:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-12 16:01 [PATCH] git-send-email: show all headers when sending mail David D. Kilzer
2007-11-13 7:28 ` Junio C Hamano
2007-11-19 4:14 ` [PATCH v2] " David D. Kilzer
2007-11-19 8:17 ` Junio C Hamano
2007-11-19 10:48 ` Ask Bjørn Hansen [this message]
2007-11-19 18:50 ` David D. Kilzer
2007-11-20 1:53 ` Ask Bjørn Hansen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1195469295-5774-1-git-send-email-ask@develooper.com \
--to=ask@develooper.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).