Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
pager: lose a separate argv[]
author
Junio C Hamano
<gitster@pobox.com>
Tue, 16 Feb 2016 22:26:40 +0000
(14:26 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 16 Feb 2016 22:26:40 +0000
(14:26 -0800)
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>
pager.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
7aa2da6
)
diff --git
a/pager.c
b/pager.c
index 070dc11cb0c85abf07763de46a82e73dde6bded2..5dbcc5ace395b0fb5d2fec09e8d53c7f1bce3fb2 100644
(file)
--- a/
pager.c
+++ b/
pager.c
@@
-11,7
+11,6
@@
* something different on Windows.
*/
* 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)
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 */
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.use_shell = 1;
- pager_process.argv = pager_argv;
pager_process.in = -1;
if (!getenv("LESS"))
argv_array_push(&pager_process.env_array, "LESS=FRX");
pager_process.in = -1;
if (!getenv("LESS"))
argv_array_push(&pager_process.env_array, "LESS=FRX");