Merge branch 'jc/pager-configuration-doc'

It was unclear in the documentation how various configurations and
environment variables determine which pager is eventually used.

* jc/pager-configuration-doc:
  config: rewrite core.pager documentation
This commit is contained in:
Junio C Hamano 2013-09-12 14:41:53 -07:00
commit d5d0a23dbb

View File

@ -553,22 +553,20 @@ sequence.editor::
When not configured the default commit message editor is used instead. When not configured the default commit message editor is used instead.
core.pager:: core.pager::
The command that Git will use to paginate output. Can Text viewer for use by Git commands (e.g., 'less'). The value
be overridden with the `GIT_PAGER` environment is meant to be interpreted by the shell. The order of preference
variable. Note that Git sets the `LESS` environment is the `$GIT_PAGER` environment variable, then `core.pager`
variable to `FRSX` if it is unset when it runs the configuration, then `$PAGER`, and then the default chosen at
pager. One can change these settings by setting the compile time (usually 'less').
`LESS` variable to some other value. Alternately, +
these settings can be overridden on a project or When the `LESS` environment variable is unset, Git sets it to `FRSX`
global basis by setting the `core.pager` option. (if `LESS` environment variable is set, Git does not change it at
Setting `core.pager` has no effect on the `LESS` all). If you want to selectively override Git's default setting
environment variable behaviour above, so if you want for `LESS`, you can set `core.pager` to e.g. `less -+S`. This will
to override Git's default settings this way, you need be passed to the shell by Git, which will translate the final
to be explicit. For example, to disable the S option command to `LESS=FRSX less -+S`. The environment tells the command
in a backward compatible manner, set `core.pager` to set the `S` option to chop long lines but the command line
to `less -+S`. This will be passed to the shell by resets it to the default to fold long lines.
Git, which will translate the final command to
`LESS=FRSX less -+S`.
core.whitespace:: core.whitespace::
A comma separated list of common whitespace problems to A comma separated list of common whitespace problems to