From: Michael Witten Date: Sat, 18 Apr 2009 17:01:59 GMT Subject: [PATCH RFC3.5 03/12] send-email: Interpret --smtp-server "" as "use a default". Message-ID: <1240074128-16132-4-git-send-email-mfwitten@gmail.com> In-Reply-To: <1240074128-16132-3-git-send-email-mfwitten@gmail.com> Why not? It's at least useful for testing. Signed-off-by: Michael Witten --- Documentation/git-send-email.txt | 4 +++- git-send-email.perl | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt index 071e9bf..ae01632 100644 --- a/Documentation/git-send-email.txt +++ b/Documentation/git-send-email.txt @@ -132,7 +132,9 @@ user is prompted for a password while the input is masked for privacy. be specified by the 'sendemail.smtpserver' configuration variable; the built-in default is `/usr/sbin/sendmail` or `/usr/lib/sendmail` if such a program is available, or - `localhost` otherwise. + `localhost` otherwise. Also, a built-in default is used if + `` or 'sendemail.smtpserver' is the empty string (for + example, if '--smtp-server ""' is specified on the command line). --smtp-server-port=:: Specifies a port different from the default port (SMTP diff --git a/git-send-email.perl b/git-send-email.perl index 1a20b2c..5e669c7 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -675,7 +675,7 @@ if (defined $initial_reply_to) { $initial_reply_to = "<$initial_reply_to>" if $initial_reply_to ne ''; } -if (defined $smtp_server) { +if (defined $smtp_server && $smtp_server ne '') { $smtp_server_is_a_command = ($smtp_server =~ m{^/}); -- 1.6.2.2.479.g2aec