doc: add more examples of overriding LESS in core.pager We set the LESS environment variable unconditionally which can surprise users of pagers which respect it but presume we'd only set LESS when `core.pager` calls less. Provide examples of setting LESS in `core.pager` as an additional way to override the options we set in LESS. Reported-by: Francisco Boni <boboniboni@gmail.com> Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff --git a/Documentation/config/core.adoc b/Documentation/config/core.adoc index a0ebf03..2cee57c 100644 --- a/Documentation/config/core.adoc +++ b/Documentation/config/core.adoc
@@ -606,9 +606,17 @@ long lines. Similarly, setting `core.pager` to `less -+F` will deactivate the `F` option specified by the environment from the command-line, deactivating the "quit if one screen" behavior of -`less`. One can specifically activate some flags for particular -commands: for example, setting `pager.blame` to `less -S` enables -line truncation only for `git blame`. +`less`. ++ +Another way to deactivate an option is prefixing `core.pager` with +`LESS="RX"` to remove `-F` or `LESS=""` to override all options. +This is useful if the `core.pager` command eventually runs `less` or +a command which respects the `LESS` environment variable but lacks +command line options to override `LESS` options. ++ +One can specifically activate some flags for particular commands: for +example, setting `pager.blame` to `less -S` enables line truncation +only for `git blame`. + Likewise, when the `LV` environment variable is unset, Git sets it to `-c`. You can override this setting by exporting `LV` with