diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-02-16 23:34:44 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-02-17 18:19:15 +0100 |
commit | 3e3a4a41b0dac564c0302ced4ccc423d0d39bc21 (patch) | |
tree | c3317045271879bd260981ce8d96d145021df8f4 /cache.h | |
parent | pager: lose a separate argv[] (diff) | |
download | git-3e3a4a41b0dac564c0302ced4ccc423d0d39bc21.tar.xz git-3e3a4a41b0dac564c0302ced4ccc423d0d39bc21.zip |
pager: factor out a helper to prepare a child process to run the pager
When running a pager, we need to run the program git_pager() gave
us, but we need to make sure we spawn it via the shell (i.e. it is
valid to say PAGER='less -S', for example) and give default values
to $LESS and $LV environment variables. Factor out these details
to a separate helper function.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -210,7 +210,9 @@ struct cache_entry { #error "CE_EXTENDED_FLAGS out of range" #endif +/* Forward structure decls */ struct pathspec; +struct child_process; /* * Copy the sha1 and stat state of a cache entry from one to @@ -1550,6 +1552,7 @@ extern int pager_use_color; extern int term_columns(void); extern int decimal_width(uintmax_t); extern int check_pager_config(const char *cmd); +extern void prepare_pager_args(struct child_process *, const char *pager); extern const char *editor_program; extern const char *askpass_program; |