summaryrefslogtreecommitdiff
path: root/pager.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2009-12-30 10:53:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-01-06 07:41:50 (GMT)
commitac0ba18df0c58decfb128336bab51a172c77abc0 (patch)
tree4c36514cde57577ad2533e87decccdaa0c939c6e /pager.c
parentfa7151a61edf585abdbb3d2831e7992bf3925671 (diff)
downloadgit-ac0ba18df0c58decfb128336bab51a172c77abc0.zip
git-ac0ba18df0c58decfb128336bab51a172c77abc0.tar.gz
git-ac0ba18df0c58decfb128336bab51a172c77abc0.tar.bz2
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>
Diffstat (limited to 'pager.c')
-rw-r--r--pager.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pager.c b/pager.c
index 92c03f6..2c7e8ec 100644
--- a/pager.c
+++ b/pager.c
@@ -28,7 +28,7 @@ static void pager_preexec(void)
}
#endif
-static const char *pager_argv[] = { "sh", "-c", NULL, NULL };
+static const char *pager_argv[] = { NULL, NULL };
static struct child_process pager_process;
static void wait_for_pager(void)
@@ -81,7 +81,8 @@ void setup_pager(void)
spawned_pager = 1; /* means we are emitting to terminal */
/* spawn the pager */
- pager_argv[2] = pager;
+ pager_argv[0] = pager;
+ pager_process.use_shell = 1;
pager_process.argv = pager_argv;
pager_process.in = -1;
if (!getenv("LESS")) {