summaryrefslogtreecommitdiff
path: root/git-sh-setup.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-08-08 14:48:44 -0700
committerJunio C Hamano <gitster@pobox.com>2016-08-08 14:48:44 -0700
commit43a42aa40303b2b5a3fdd04a04ce4f8d015d14eb (patch)
tree0266c7f74ea0a866b25d751b9d283c7c46cff6d3 /git-sh-setup.sh
parentdc7e09a3e0b1a06348a0b59da71ceefe08489e77 (diff)
parent995bc22d7f8c611e342095a211065f8585a08e65 (diff)
downloadgit-43a42aa40303b2b5a3fdd04a04ce4f8d015d14eb.tar.gz
Merge branch 'ew/build-time-pager-tweaks'
The build procedure learned PAGER_ENV knob that lists what default environment variable settings to export for popular pagers. This mechanism is used to tweak the default settings to MORE on FreeBSD. * ew/build-time-pager-tweaks: pager: move pager-specific setup into the build
Diffstat (limited to 'git-sh-setup.sh')
-rw-r--r--git-sh-setup.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/git-sh-setup.sh b/git-sh-setup.sh
index 0c34aa62f6..a8a4576342 100644
--- a/git-sh-setup.sh
+++ b/git-sh-setup.sh
@@ -163,9 +163,11 @@ git_pager() {
else
GIT_PAGER=cat
fi
- : "${LESS=-FRX}"
- : "${LV=-c}"
- export LESS LV
+ for vardef in @@PAGER_ENV@@
+ do
+ var=${vardef%%=*}
+ eval ": \"\${$vardef}\" && export $var"
+ done
eval "$GIT_PAGER" '"$@"'
}