Skip to content

Commit

Permalink
pager: lose a separate argv[]
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Feb 16, 2016
1 parent 7aa2da6 commit 43b0190
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pager.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 43b0190

Please sign in to comment.