diff options
Diffstat (limited to 'pager.c')
-rw-r--r-- | pager.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -78,6 +78,7 @@ void setup_pager(void) argv_array_push(&pager_process.env_array, "LESS=FRX"); if (!getenv("LV")) argv_array_push(&pager_process.env_array, "LV=-c"); + argv_array_push(&pager_process.env_array, "GIT_PAGER_IN_USE"); if (start_command(&pager_process)) return; @@ -149,7 +150,8 @@ int check_pager_config(const char *cmd) struct strbuf key = STRBUF_INIT; const char *value = NULL; strbuf_addf(&key, "pager.%s", cmd); - if (!git_config_get_value(key.buf, &value)) { + if (git_config_key_is_valid(key.buf) && + !git_config_get_value(key.buf, &value)) { int b = git_config_maybe_bool(key.buf, value); if (b >= 0) want = b; |