Skip to content

Commit f9dc5d6

Browse files
ockhamgitster
authored andcommitted
git-imap-send: simplify tunnel construction
Signed-off-by: Bernhard Reiter <[email protected]> Reviewed-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6c4ab27 commit f9dc5d6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

imap-send.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -961,17 +961,16 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc)
961961
/* open connection to IMAP server */
962962

963963
if (srvc->tunnel) {
964-
const char *argv[] = { srvc->tunnel, NULL };
965964
struct child_process tunnel = {NULL};
966965

967966
imap_info("Starting tunnel '%s'... ", srvc->tunnel);
968967

969-
tunnel.argv = argv;
968+
argv_array_push(&tunnel.args, srvc->tunnel);
970969
tunnel.use_shell = 1;
971970
tunnel.in = -1;
972971
tunnel.out = -1;
973972
if (start_command(&tunnel))
974-
die("cannot start proxy %s", argv[0]);
973+
die("cannot start proxy %s", srvc->tunnel);
975974

976975
imap->buf.sock.fd[0] = tunnel.out;
977976
imap->buf.sock.fd[1] = tunnel.in;

0 commit comments

Comments
 (0)