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>
Junio C Hamano committed
Feb 16, 2016 at 14:26 UTC
43b019022478703758b3744fa242867ed620a9a6
1 file changed
+1
-3
pager.c
+1
-3
@@ -11,7 +11,6 @@
11
* something different on Windows.
12
*/
13
14
-static const char *pager_argv[] = { NULL, NULL };
14
static struct child_process pager_process = CHILD_PROCESS_INIT;
15
16
static void wait_for_pager(void)
@@ -70,9 +69,8 @@ void setup_pager(void)
69
setenv("GIT_PAGER_IN_USE", "true", 1);
70
71
/* spawn the pager */
73
- pager_argv[0] = pager;
72
+ argv_array_push(&pager_process.args, pager);
73
pager_process.use_shell = 1;
75
- pager_process.argv = pager_argv;
74
pager_process.in = -1;
75
if (!getenv("LESS"))
76
argv_array_push(&pager_process.env_array, "LESS=FRX");