{"thread":{"id":"37343","subject":"[PATCH] git-imap-send: simplify tunnel construction","startedAt":"2014-08-13T17:30:43Z","lastAt":"2014-08-18T17:15:17Z","messageCount":4,"participants":["Bernhard Reiter","Jeff King","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"247676","messageId":"53EBA0C3.2040805@raz.or.at","threadId":"37343","inReplyTo":null,"subject":"[PATCH] git-imap-send: simplify tunnel construction","fromName":"Bernhard Reiter","fromEmail":"ockham@raz.or.at","sentAt":"2014-08-13T17:30:43Z","receivedAt":"2014-08-13T17:30:43Z","isPatch":true,"sender":{"key":"ockham@raz.or.at","avatar":"https://avatars.githubusercontent.com/u/96308?v=4"},"body":"\nSigned-off-by: Bernhard Reiter <ockham@raz.or.at>\n---\n imap-send.c | 5 ++---\n 1 file changed, 2 insertions(+), 3 deletions(-)\n\n\n\n\ndiff --git a/imap-send.c b/imap-send.c\nindex 524fbab..fb01a9c 100644\n--- a/imap-send.c\n+++ b/imap-send.c\n@@ -961,17 +961,16 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc)\n \t/* open connection to IMAP server */\n \n \tif (srvc->tunnel) {\n-\t\tconst char *argv[] = { srvc->tunnel, NULL };\n \t\tstruct child_process tunnel = {NULL};\n \n \t\timap_info(\"Starting tunnel '%s'... \", srvc->tunnel);\n \n-\t\ttunnel.argv = argv;\n+\t\targv_array_push(&tunnel.args, srvc->tunnel);\n \t\ttunnel.use_shell = 1;\n \t\ttunnel.in = -1;\n \t\ttunnel.out = -1;\n \t\tif (start_command(&tunnel))\n-\t\t\tdie(\"cannot start proxy %s\", argv[0]);\n+\t\t\tdie(\"cannot start proxy %s\", srvc->tunnel);\n \n \t\timap->buf.sock.fd[0] = tunnel.out;\n \t\timap->buf.sock.fd[1] = tunnel.in;\n\n"},{"id":"247805","messageId":"20140817073058.GF23808@peff.net","threadId":"37343","inReplyTo":"53EBA0C3.2040805@raz.or.at","subject":"Re: [PATCH] git-imap-send: simplify tunnel construction","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-08-17T07:30:58Z","receivedAt":"2014-08-17T07:30:58Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Aug 13, 2014 at 07:30:43PM +0200, Bernhard Reiter wrote:\n\n> Signed-off-by: Bernhard Reiter <ockham@raz.or.at>\n> ---\n>  imap-send.c | 5 ++---\n>  1 file changed, 2 insertions(+), 3 deletions(-)\n\nThanks, this looks obviously correct and is a good direction.\n\n-Peff\n"},{"id":"247850","messageId":"xmqq1tsdybq8.fsf@gitster.dls.corp.google.com","threadId":"37343","inReplyTo":"53EBA0C3.2040805@raz.or.at","subject":"Re: [PATCH] git-imap-send: simplify tunnel construction","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-08-18T17:00:15Z","receivedAt":"2014-08-18T17:00:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Bernhard Reiter <ockham@raz.or.at> writes:\n\n> Signed-off-by: Bernhard Reiter <ockham@raz.or.at>\n> ---\n>  imap-send.c | 5 ++---\n>  1 file changed, 2 insertions(+), 3 deletions(-)\n\nOy.  Where is the patch?\n\nPlease avoid multipart/mixed on this list.\n\nThanks.\n"},{"id":"247852","messageId":"53F234A5.7010704@raz.or.at","threadId":"37343","inReplyTo":"xmqq1tsdybq8.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] git-imap-send: simplify tunnel construction","fromName":"Bernhard Reiter","fromEmail":"ockham@raz.or.at","sentAt":"2014-08-18T17:15:17Z","receivedAt":"2014-08-18T17:15:17Z","isPatch":true,"sender":{"key":"ockham@raz.or.at","avatar":"https://avatars.githubusercontent.com/u/96308?v=4"},"body":"Am 2014-08-18 um 19:00 schrieb Junio C Hamano:\n> Bernhard Reiter <ockham@raz.or.at> writes:\n> \n>> Signed-off-by: Bernhard Reiter <ockham@raz.or.at>\n>> ---\n>>  imap-send.c | 5 ++---\n>>  1 file changed, 2 insertions(+), 3 deletions(-)\n> \n> Oy.  Where is the patch?\n> \n> Please avoid multipart/mixed on this list.\n> \n> Thanks.\n\nD'oh. Sorry about that. Strangely, that's what I'm getting from a\nmessage created with git-imap-send. Maybe Thunderbird is messing it up\nafterwards. Anyway:\n\ndiff --git a/imap-send.c b/imap-send.c\nindex 524fbab..fb01a9c 100644\n--- a/imap-send.c\n+++ b/imap-send.c\n@@ -961,17 +961,16 @@ static struct imap_store *imap_open_store(struct\nimap_server_conf *srvc)\n \t/* open connection to IMAP server */\n\n \tif (srvc->tunnel) {\n-\t\tconst char *argv[] = { srvc->tunnel, NULL };\n \t\tstruct child_process tunnel = {NULL};\n\n \t\timap_info(\"Starting tunnel '%s'... \", srvc->tunnel);\n\n-\t\ttunnel.argv = argv;\n+\t\targv_array_push(&tunnel.args, srvc->tunnel);\n \t\ttunnel.use_shell = 1;\n \t\ttunnel.in = -1;\n \t\ttunnel.out = -1;\n \t\tif (start_command(&tunnel))\n-\t\t\tdie(\"cannot start proxy %s\", argv[0]);\n+\t\t\tdie(\"cannot start proxy %s\", srvc->tunnel);\n\n \t\timap->buf.sock.fd[0] = tunnel.out;\n \t\timap->buf.sock.fd[1] = tunnel.in;\n"}]}