git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] pager: remove 'S' from $LESS by default

From
Junio C Hamano <gitster@pobox.com>
Date
May 6, 2014, 17:34 UTC
Message-ID
<xmqqppjqg6an.fsf@gitster.dls.corp.google.com>
In-Reply-To
<110110563.544859.1399320654149.JavaMail.zimbra@imag.fr>
Matthieu Moy <matthieu.moy@grenoble-inp.fr> writes:
Show 18 quoted lines
>> > By default, Git used to set $LESS to -FRSX if $LESS was not set by the
>> > user. The FRX flags actually make sense for Git (F and X because Git
>> > sometimes pipes short output to less, and R because Git pipes colored
>> > output). The S flag (chop long lines), on the other hand, is not related
>> > to Git and is a matter of user preference. Git should not decide for the
>> > user to change LESS's default.
>> 
>> Thanks!  Sounds like a very good change.
>> 
>> (Nit: instead of "because Git sometimes pipes short output to less",
>> it would be clearer to say something like "when Git pipes short output
>> to less it is nice to exit and let the user type their next command".)
>
> It's actually a bit more than this: X to avoid initializing the terminal
> and F for the exit behavior you describe.
>
> But since the change is actually not about F and X, I prefered keeping
> the text about them as short as possible, so I prefer my version actually.
True.

As some of you might know, the version I use for my regular work is slightly ahead of 'next' (you can see where it is by running "git log --oneline --first-parent master..pu" and find the first entry marked as "Merge ... into jch"). After having this patch for a few days in there and using it, I have to say that I like this change a lot while viewing the "git log -p" output.

I still find the output from "git blame" disturbing, though. The first thing I do in "git blame" output is to scroll to the right in order to identify the the area I am interested in, and this first step is not negatively affected, because the right scrolled output automatically wraps long lines.

But my second step is to scroll back to the left edge to find the commit object name and at that point, the new default output without "S" gets somewhat annoying, because most of the output lines from "git blame" are longer than my window width.

Previous: Matthieu MoyNext: David Kastrup
Message 35 of 41 in “Harmful LESS flags”
  1. d9ba@mailtor.netApr 23, 2014
  2. Jonathan NiederApr 24, 2014
  3. Mark NudelmanApr 28, 2014
  4. David KastrupApr 24, 2014
  5. Junio C HamanoApr 24, 2014
  6. David KastrupApr 24, 2014
  7. Junio C HamanoApr 24, 2014
  8. David KastrupApr 24, 2014
  9. Jeff KingApr 24, 2014
  10. Junio C HamanoApr 24, 2014
  11. Jeff KingApr 24, 2014
  12. David KastrupApr 24, 2014
  13. Jeff KingApr 24, 2014
  14. David KastrupApr 24, 2014
  15. Jonathan NiederApr 24, 2014
  16. Matthieu MoyApr 25, 2014
  17. Jonathan NiederApr 25, 2014
  18. David KastrupApr 25, 2014
  19. Jonathan NiederApr 25, 2014
  20. PAGER_ENV: remove 'S' from $LESS by defaultMatthieu Moy, Apr 28, 2014
  21. David KastrupApr 28, 2014
  22. Matthieu MoyApr 28, 2014
  23. David KastrupApr 28, 2014
  24. Matthieu MoyApr 28, 2014
  25. Jeff KingApr 28, 2014
  26. Junio C HamanoApr 28, 2014
  27. Matthieu MoyApr 29, 2014
  28. Junio C HamanoApr 29, 2014
  29. pager: remove 'S' from $LESS by defaultMatthieu Moy, Apr 30, 2014
  30. Junio C HamanoApr 30, 2014
  31. Matthieu MoyApr 30, 2014
  32. Junio C HamanoApr 30, 2014
  33. Jonathan NiederMay 5, 2014
  34. Matthieu MoyMay 5, 2014
  35. Junio C HamanoMay 6, 2014
  36. David KastrupMay 6, 2014
  37. Matthieu MoyMay 6, 2014
  38. Jeff KingMay 6, 2014
  39. Junio C HamanoMay 7, 2014
  40. Matthieu MoyMay 7, 2014
  41. Junio C HamanoMay 7, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.