@matheusbsbs / matheus-bagliano / commits / fee75457fc
Fork 0

Documentation: clarify the details of overriding LESS via core.pager

The process of overriding the default LESS options using only git-specific methods is rather obscure. Show the end user how to do it in a step-by-step manner. Signed-off-by: Chris Frey <cdfrey@foursquare.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Chris Frey committed Sep 24, 2008 at 19:21 UTC fee75457fc45e299c2a962bb9c3949f33f176c02
1 file changed +11 -2
Documentation/config.txt
+11 -2
@@ -363,8 +363,17 @@ core.pager::
363 variable. Note that git sets the `LESS` environment
364 variable to `FRSX` if it is unset when it runs the
365 pager. One can change these settings by setting the
366 - `LESS` variable to some other value or by giving the
367 - `core.pager` option a value such as "`less -+FRSX`".
366 + `LESS` variable to some other value. Alternately,
367 + these settings can be overridden on a project or
368 + global basis by setting the `core.pager` option.
369 + Setting `core.pager` has no affect on the `LESS`
370 + environment variable behaviour above, so if you want
371 + to override git's default settings this way, you need
372 + to be explicit. For example, to disable the S option
373 + in a backward compatible manner, set `core.pager`
374 + to "`less -+$LESS -FRX`". This will be passed to the
375 + shell by git, which will translate the final command to
376 + "`LESS=FRSX less -+FRSX -FRX`".
377
378 core.whitespace::
379 A comma separated list of common whitespace problems to