From: Sergey Vlasov <vsu@altlinux.ru>
To: Junio C Hamano <junkio@cox.net>
Cc: Ryan Anderson <rda@google.com>,
git@vger.kernel.org, Sergey Vlasov <vsu@altlinux.ru>
Subject: [PATCH 2/2] git-send-email: Read the default SMTP server from the GIT config file
Date: Sun, 29 Oct 2006 22:31:39 +0300 [thread overview]
Message-ID: <11621503001930-git-send-email-vsu@altlinux.ru> (raw)
In-Reply-To: <11621502993406-git-send-email-vsu@altlinux.ru>
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>
---
Documentation/git-send-email.txt | 8 +++++---
git-send-email.perl | 3 +++
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index ec0e201..4c8d907 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -68,9 +68,11 @@ The options available are:
--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 c42dc3b..4c87c20 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -231,6 +231,9 @@ if (!defined $initial_reply_to && $promp
}
if (!$smtp_server) {
+ $smtp_server = $repo->config('sendemail.smtpserver');
+}
+if (!$smtp_server) {
foreach (qw( /usr/sbin/sendmail /usr/lib/sendmail )) {
if (-x $_) {
$smtp_server = $_;
--
1.4.3.3.ge502
next prev parent reply other threads:[~2006-10-29 19:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-29 19:31 [PATCH 1/2] git-send-email: Document support for local sendmail instead of SMTP server Sergey Vlasov
2006-10-29 19:31 ` Sergey Vlasov [this message]
2006-10-29 20:37 ` [PATCH 2/2] git-send-email: Read the default SMTP server from the GIT config file Ryan Anderson
2006-10-29 20:34 ` [PATCH 1/2] git-send-email: Document support for local sendmail instead of SMTP server Ryan Anderson
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=11621503001930-git-send-email-vsu@altlinux.ru \
--to=vsu@altlinux.ru \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=rda@google.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.