diff options
Diffstat (limited to 'pager.c')
| -rw-r--r-- | pager.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -8,7 +8,7 @@ #define DEFAULT_PAGER "less" #endif -static struct child_process pager_process = CHILD_PROCESS_INIT; +static struct child_process pager_process; static const char *pager_program; /* Is the value coming back from term_columns() just a guess? */ @@ -99,7 +99,7 @@ void prepare_pager_args(struct child_process *pager_process, const char *pager) { strvec_push(&pager_process->args, pager); pager_process->use_shell = 1; - setup_pager_env(&pager_process->env_array); + setup_pager_env(&pager_process->env); pager_process->trace2_child_class = "pager"; } @@ -124,10 +124,12 @@ void setup_pager(void) setenv("GIT_PAGER_IN_USE", "true", 1); + child_process_init(&pager_process); + /* spawn the pager */ prepare_pager_args(&pager_process, pager); pager_process.in = -1; - strvec_push(&pager_process.env_array, "GIT_PAGER_IN_USE"); + strvec_push(&pager_process.env, "GIT_PAGER_IN_USE"); if (start_command(&pager_process)) return; |
