summaryrefslogtreecommitdiff
path: root/pager.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-02-16 22:26:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-02-16 22:26:40 (GMT)
commit43b019022478703758b3744fa242867ed620a9a6 (patch)
tree1277ec6111906385f013f6f90e5152e933baab48 /pager.c
parent7aa2da616208a51ec51ce3639fe6abd9631b74db (diff)
downloadgit-43b019022478703758b3744fa242867ed620a9a6.zip
git-43b019022478703758b3744fa242867ed620a9a6.tar.gz
git-43b019022478703758b3744fa242867ed620a9a6.tar.bz2
pager: lose a separate argv[]
These days, using the embedded args array in the child_process structure is the norm. Follow that practice. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pager.c')
-rw-r--r--pager.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/pager.c b/pager.c
index 070dc11..5dbcc5a 100644
--- a/pager.c
+++ b/pager.c
@@ -11,7 +11,6 @@
* something different on Windows.
*/
-static const char *pager_argv[] = { NULL, NULL };
static struct child_process pager_process = CHILD_PROCESS_INIT;
static void wait_for_pager(void)
@@ -70,9 +69,8 @@ void setup_pager(void)
setenv("GIT_PAGER_IN_USE", "true", 1);
/* spawn the pager */
- pager_argv[0] = pager;
+ argv_array_push(&pager_process.args, pager);
pager_process.use_shell = 1;
- pager_process.argv = pager_argv;
pager_process.in = -1;
if (!getenv("LESS"))
argv_array_push(&pager_process.env_array, "LESS=FRX");