git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Don't force imap.host to be set when imap.tunnel is set

From
APAndy Parkins <andyparkins@gmail.com>
Date
Apr 21, 2008, 13:59 UTC
Message-ID
<200804211459.07527.andyparkins@gmail.com>
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
Next: Junio C Hamano
Message 1 of 5 in “Don't force imap.host to be set when imap.tunnel is set”
  1. Don't force imap.host to be set when imap.tunnel is setAndy Parkins, Apr 21, 2008
  2. Junio C HamanoApr 22, 2008
  3. Andy ParkinsApr 22, 2008
  4. Jeff KingApr 22, 2008
  5. Andy ParkinsApr 22, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.