summaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorDavid D. Kilzer <ddkilzer@kilzer.net>2007-11-18 20:14:55 -0800
committerJunio C Hamano <gitster@pobox.com>2007-11-19 00:19:46 -0800
commitb7f30e0a972ab90a0f7720a7d6411822eb796ea3 (patch)
tree4d568fef33568c27843c2a4be9692d44d632b064 /git-send-email.perl
parent5d1d1c14790cf74eb0d630c4404114206061232d (diff)
downloadgit-b7f30e0a972ab90a0f7720a7d6411822eb796ea3.tar.gz
git-send-email: show all headers when sending mail
As a git newbie, it was confusing to set an In-Reply-To header but then not see it printed when the git-send-email command was run. This patch prints all headers that would be sent to sendmail or an SMTP server instead of only printing From, Subject, Cc, To. It also removes the now-extraneous Date header after the "Log says" line. Added test to t/t9001-send-email.sh. Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index fd0a4ad0c2..47afc56915 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -643,7 +643,7 @@ X-Mailer: git-send-email $gitversion
if ($quiet) {
printf (($dry_run ? "Dry-" : "")."Sent %s\n", $subject);
} else {
- print (($dry_run ? "Dry-" : "")."OK. Log says:\nDate: $date\n");
+ print (($dry_run ? "Dry-" : "")."OK. Log says:\n");
if ($smtp_server !~ m#^/#) {
print "Server: $smtp_server\n";
print "MAIL FROM:<$raw_from>\n";
@@ -651,7 +651,7 @@ 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 $header, "\n";
if ($smtp) {
print "Result: ", $smtp->code, ' ',
($smtp->message =~ /\n([^\n]+\n)$/s), "\n";