summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9c572b2)
raw | patch | inline | side by side (parent: 9c572b2)
author | Sergey Vlasov <vsu@altlinux.ru> | |
Sun, 29 Oct 2006 19:31:39 +0000 (22:31 +0300) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 29 Oct 2006 20:45:23 +0000 (12:45 -0800) |
Make the default value for --smtp-server configurable through the
'sendemail.smtpserver' option in .git/config (or $HOME/.gitconfig).
Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Acked-by: Ryan Anderson <rda@google.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
'sendemail.smtpserver' option in .git/config (or $HOME/.gitconfig).
Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Acked-by: Ryan Anderson <rda@google.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/git-send-email.txt | patch | blob | history | |
git-send-email.perl | patch | blob | history |
index ec0e20182b2fc74ff4be9773426d39539c2d0aec..4c8d907bd595a4f31b3f53cfff25b84cea059ff7 100644 (file)
--smtp-server::
If set, specifies the outgoing SMTP server to use. A full
pathname of a sendmail-like program can be specified instead;
- the program must support the `-i` option. Defaults to
- `/usr/sbin/sendmail` or `/usr/lib/sendmail` if such program is
- available, or to `localhost` otherwise.
+ the program must support the `-i` option. Default value can
+ be specified by the 'sendemail.smtpserver' configuration
+ option; the built-in default is `/usr/sbin/sendmail` or
+ `/usr/lib/sendmail` if such program is available, or
+ `localhost` otherwise.
--subject::
Specify the initial subject of the email thread.
diff --git a/git-send-email.perl b/git-send-email.perl
index c42dc3bc943edb2e8f5d9e11a309f6e6d86848ab..4c87c20c158fe3edfd0b770f1855e67e20038e3b 100755 (executable)
--- a/git-send-email.perl
+++ b/git-send-email.perl
$initial_reply_to =~ s/(^\s+|\s+$)//g;
}
+if (!$smtp_server) {
+ $smtp_server = $repo->config('sendemail.smtpserver');
+}
if (!$smtp_server) {
foreach (qw( /usr/sbin/sendmail /usr/lib/sendmail )) {
if (-x $_) {