summaryrefslogtreecommitdiff
path: root/pager.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-07-13 21:00:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-07-13 21:00:27 (GMT)
commit6cf7eef384968e9886e9d2eba440974c66908aa6 (patch)
tree175108677b5551655a5d951316a7b06e7ec394b1 /pager.c
parent43f23b09bffed2ab8852725e26f746d1f762cc85 (diff)
parent124b51909dab82151dff8ae8fd3a588a8846c7ac (diff)
downloadgit-6cf7eef384968e9886e9d2eba440974c66908aa6.zip
git-6cf7eef384968e9886e9d2eba440974c66908aa6.tar.gz
git-6cf7eef384968e9886e9d2eba440974c66908aa6.tar.bz2
Merge branch 'jc/unexport-git-pager-in-use-in-pager'
When you say "!<ENTER>" while running say "git log", you'd confuse yourself in the resulting shell, that may look as if you took control back to the original shell you spawned "git log" from but that isn't what is happening. To that new shell, we leaked GIT_PAGER_IN_USE environment variable that was meant as a local communication between the original "Git" and subprocesses that was spawned by it after we launched the pager, which caused many "interesting" things to happen, e.g. "git diff | cat" still paints its output in color by default. Stop leaking that environment variable to the pager's half of the fork; we only need it on "Git" side when we spawn the pager. * jc/unexport-git-pager-in-use-in-pager: pager: do not leak "GIT_PAGER_IN_USE" to the pager
Diffstat (limited to 'pager.c')
-rw-r--r--pager.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/pager.c b/pager.c
index 98b2682..070dc11 100644
--- a/pager.c
+++ b/pager.c
@@ -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;