run-command: convert simple callsites to use_shell

Now that we have the use_shell feature, these callsites can
all be converted with small changes.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King
2009-12-30 05:53:57 -05:00
committed by Junio C Hamano
parent fa7151a61e
commit ac0ba18df0
4 changed files with 10 additions and 12 deletions

View File

@ -965,17 +965,13 @@ static struct store *imap_open_store(struct imap_server_conf *srvc)
/* open connection to IMAP server */
if (srvc->tunnel) {
const char *argv[4];
const char *argv[] = { srvc->tunnel, NULL };
struct child_process tunnel = {0};
imap_info("Starting tunnel '%s'... ", srvc->tunnel);
argv[0] = "sh";
argv[1] = "-c";
argv[2] = srvc->tunnel;
argv[3] = NULL;
tunnel.argv = argv;
tunnel.use_shell = 1;
tunnel.in = -1;
tunnel.out = -1;
if (start_command(&tunnel))