git-send-email: Add --quiet to reduce some of the chatter when sending emails.
Signed-off-by: Ryan Anderson <ryan@michonline.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Ryan Anderson committed
Feb 2, 2006 at 11:56 UTC
30d08b34aa268e3bd4c93fa712e2eac66f1a15b3
1 file changed
+6
-3
git-send-email.perl
+6
-3
@@ -34,7 +34,7 @@ my $compose_filename = ".msg.$$";
34
my (@to,@cc,$initial_reply_to,$initial_subject,@files,$from,$compose);
35
36
# Behavior modification variables
37
-my ($chain_reply_to, $smtp_server) = (1, "localhost");
37
+my ($chain_reply_to, $smtp_server, $quiet) = (1, "localhost", 0);
38
39
# Example reply to:
40
#$initial_reply_to = ''; #<20050203173208.GA23964@foobar.com>';
@@ -51,6 +51,7 @@ my $rc = GetOptions("from=s" => \$from,
51
"chain-reply-to!" => \$chain_reply_to,
52
"smtp-server=s" => \$smtp_server,
53
"compose" => \$compose,
54
+ "quiet" => \$quiet,
55
);
56
57
# Now, let's fill any that aren't set in with defaults:
@@ -267,8 +268,10 @@ sub send_message
268
269
sendmail(%mail) or die $Mail::Sendmail::error;
270
270
- print "OK. Log says:\n", $Mail::Sendmail::log;
271
- print "\n\n"
271
+ unless ($quiet) {
272
+ print "OK. Log says:\n", $Mail::Sendmail::log;
273
+ print "\n\n"
274
+ }
275
}
276
277