git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Don't force imap.host to be set when imap.tunnel is set
@ 2008-04-21 13:59 Andy Parkins
  2008-04-22  6:47 ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Parkins @ 2008-04-21 13:59 UTC (permalink / raw)
  To: git

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 led me to have to put
the following in my .gitconfig.

 [imap]
   host = dummy

This patch changes imap-send to only require that the imap.host setting
is set if imap.tunnel is _not_ set.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
---
 imap-send.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/imap-send.c b/imap-send.c
index 04afbc4..e15df1e 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -1302,7 +1302,7 @@ main(int argc, char **argv)
 		fprintf( stderr, "no imap store specified\n" );
 		return 1;
 	}
-	if (!server.host) {
+	if (!server.host && !server.tunnel) {
 		fprintf( stderr, "no imap host specified\n" );
 		return 1;
 	}
-- 
1.5.5.1.57.g5909c

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-04-22 15:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-21 13:59 [PATCH] Don't force imap.host to be set when imap.tunnel is set Andy Parkins
2008-04-22  6:47 ` Junio C Hamano
2008-04-22  9:11   ` Andy Parkins
2008-04-22 10:41     ` Jeff King
2008-04-22 15:07       ` Andy Parkins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).