git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH] Don't force imap.host to be set when imap.tunnel is set
Date: Mon, 21 Apr 2008 14:59:07 +0100	[thread overview]
Message-ID: <200804211459.07527.andyparkins@gmail.com> (raw)

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

             reply	other threads:[~2008-04-21 14:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-21 13:59 Andy Parkins [this message]
2008-04-22  6:47 ` [PATCH] Don't force imap.host to be set when imap.tunnel is set Junio C Hamano
2008-04-22  9:11   ` Andy Parkins
2008-04-22 10:41     ` Jeff King
2008-04-22 15:07       ` Andy Parkins

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=200804211459.07527.andyparkins@gmail.com \
    --to=andyparkins@gmail.com \
    --cc=git@vger.kernel.org \
    /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 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).