Skip to content

Commit 43b0190

Browse files
committed
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 <[email protected]>
1 parent 7aa2da6 commit 43b0190

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pager.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
* something different on Windows.
1212
*/
1313

14-
static const char *pager_argv[] = { NULL, NULL };
1514
static struct child_process pager_process = CHILD_PROCESS_INIT;
1615

1716
static void wait_for_pager(void)
@@ -70,9 +69,8 @@ void setup_pager(void)
7069
setenv("GIT_PAGER_IN_USE", "true", 1);
7170

7271
/* spawn the pager */
73-
pager_argv[0] = pager;
72+
argv_array_push(&pager_process.args, pager);
7473
pager_process.use_shell = 1;
75-
pager_process.argv = pager_argv;
7674
pager_process.in = -1;
7775
if (!getenv("LESS"))
7876
argv_array_push(&pager_process.env_array, "LESS=FRX");

0 commit comments

Comments
 (0)