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
This commit is contained in:
Junio C Hamano
2016-08-08 14:48:44 -07:00
5 changed files with 67 additions and 8 deletions

View File

@@ -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" '"$@"'
}