{"thread":{"id":"15583","subject":"[PATCH] Documentation: clarify the details of overriding LESS via core.pager","startedAt":"2008-09-18T23:22:07Z","lastAt":"2008-09-24T23:21:28Z","messageCount":2,"participants":["Chris Frey"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"91083","messageId":"20080918232207.GA31193@foursquare.net","threadId":"15583","inReplyTo":null,"subject":"[PATCH] Documentation: clarify the details of overriding LESS via core.pager","fromName":"Chris Frey","fromEmail":"cdfrey@foursquare.net","sentAt":"2008-09-18T23:22:07Z","receivedAt":"2008-09-18T23:22:07Z","isPatch":true,"sender":{"key":"cdfrey@foursquare.net","avatar":null},"body":"The process of overriding the default LESS options using only\ngit-specific methods is rather obscure.  Show the end user how\nto do it in a step-by-step manner.\n\nSigned-off-by: Chris Frey <cdfrey@foursquare.net>\n---\n\nI recently upgraded to 1.6.0.2, and ran into the LESS problem again.\nI usually just hacked the code, but figured this was sub-par, expecially\nwith the documentation recently upgraded to show me how to do it\nwith core.pager.\n\nUnfortunately, it took me much longer than I would have expected.\n\nI'm assuming others will have run into this as well, so here's\nan update to the docs.\n\nThe most interesting feature I discovered while looking into this,\nwas that setting command line options in core.pager ends up using\nthe shell, which allows for additional trickery to make this\noverride truly git-specific.\n\nNow I can have different less behaviour when using it myself vs.\nusing it through git.  In the same shell.  Regardless of how I\nsetup LESS.\n\n- Chris\n\n\n Documentation/config.txt |   13 +++++++++++--\n 1 files changed, 11 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 922ac7b..9493621 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -363,8 +363,17 @@ core.pager::\n \tvariable.  Note that git sets the `LESS` environment\n \tvariable to `FRSX` if it is unset when it runs the\n \tpager.  One can change these settings by setting the\n-\t`LESS` variable to some other value or by giving the\n-\t`core.pager` option a value such as \"`less -+FRSX`\".\n+\t`LESS` variable to some other value.  Alternately,\n+\tthese settings can be overridden on a project or\n+\tglobal basis by setting the `core.pager` option.\n+\tSetting `core.pager` has no affect on the `LESS`\n+\tenvironment variable behaviour above, so if you want\n+\tto override git's default settings this way, you need\n+\tto be explicit.  For example, to disable the S option\n+\tin a backward compatible manner, set `core.pager`\n+\tto \"`less -+$LESS -FRX`\".  This will be passed to the\n+\tshell by git, which will translate the final command to\n+\t\"`LESS=FRSX less -+FRSX -FRX`\".\n \n core.whitespace::\n \tA comma separated list of common whitespace problems to\n-- \n1.6.0.2\n"},{"id":"91540","messageId":"20080924232128.GA29929@foursquare.net","threadId":"15583","inReplyTo":"20080918232207.GA31193@foursquare.net","subject":"[PATCH] Documentation: clarify the details of overriding LESS via core.pager","fromName":"Chris Frey","fromEmail":"cdfrey@foursquare.net","sentAt":"2008-09-24T23:21:28Z","receivedAt":"2008-09-24T23:21:28Z","isPatch":true,"sender":{"key":"cdfrey@foursquare.net","avatar":null},"body":"The process of overriding the default LESS options using only\ngit-specific methods is rather obscure.  Show the end user how\nto do it in a step-by-step manner.\n\nSigned-off-by: Chris Frey <cdfrey@foursquare.net>\n---\n\nNo comments on this patch last week, so sending again, to be\napplied.\n\nThanks,\n- Chris\n\n Documentation/config.txt |   13 +++++++++++--\n 1 files changed, 11 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 922ac7b..9493621 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -363,8 +363,17 @@ core.pager::\n \tvariable.  Note that git sets the `LESS` environment\n \tvariable to `FRSX` if it is unset when it runs the\n \tpager.  One can change these settings by setting the\n-\t`LESS` variable to some other value or by giving the\n-\t`core.pager` option a value such as \"`less -+FRSX`\".\n+\t`LESS` variable to some other value.  Alternately,\n+\tthese settings can be overridden on a project or\n+\tglobal basis by setting the `core.pager` option.\n+\tSetting `core.pager` has no affect on the `LESS`\n+\tenvironment variable behaviour above, so if you want\n+\tto override git's default settings this way, you need\n+\tto be explicit.  For example, to disable the S option\n+\tin a backward compatible manner, set `core.pager`\n+\tto \"`less -+$LESS -FRX`\".  This will be passed to the\n+\tshell by git, which will translate the final command to\n+\t\"`LESS=FRSX less -+FRSX -FRX`\".\n \n core.whitespace::\n \tA comma separated list of common whitespace problems to\n-- \n1.6.0.2\n"}]}