summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2498a1a)
raw | patch | inline | side by side (parent: 2498a1a)
author | Jeff King <peff@peff.net> | |
Tue, 22 Apr 2008 10:41:47 +0000 (06:41 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 23 Apr 2008 04:42:23 +0000 (21:42 -0700) |
The documentation for git-imap-send suggests a tunnel setting such as
Tunnel = "ssh -q user@server.com /usr/bin/imapd ./Maildir 2> /dev/null"
which works wonderfully and doesn't require a username, password or port
setting.
However, git-imap-send currently requires that the imap.host variable be
set in the config even when it was unused. This patch changes imap-send
to only require that the imap.host setting is set if imap.tunnel is not
set. Otherwise, server.host is set to "tunnel" for reporting purposes.
Acked-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Tunnel = "ssh -q user@server.com /usr/bin/imapd ./Maildir 2> /dev/null"
which works wonderfully and doesn't require a username, password or port
setting.
However, git-imap-send currently requires that the imap.host variable be
set in the config even when it was unused. This patch changes imap-send
to only require that the imap.host setting is set if imap.tunnel is not
set. Otherwise, server.host is set to "tunnel" for reporting purposes.
Acked-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
imap-send.c | patch | blob | history |
diff --git a/imap-send.c b/imap-send.c
index 04afbc492485d95a85a7f0f57bbb48def6337a99..db6559725e6867131800b6682348ebbf896ddbf5 100644 (file)
--- a/imap-send.c
+++ b/imap-send.c
return 1;
}
if (!server.host) {
- fprintf( stderr, "no imap host specified\n" );
- return 1;
+ if (!server.tunnel) {
+ fprintf( stderr, "no imap host specified\n" );
+ return 1;
+ }
+ server.host = "tunnel";
}
/* read the messages */