From: Francisco Boni Date: Sat, 19 Sep 2026 16:52:59 GMT Subject: Re: pager: consider revisiting automatic LESS=FRX with custom core.pager Message-ID: In-Reply-To: On Sat, Sep 19, 2026 at 12:48 PM brian m. carlson wrote: > > On 2026-09-19 at 12:19:40, Francisco Boni wrote: > > Hi, > > Ney, > > > There is also an unintuitive distinction between: > > > > ``` > > unset LESS > > ``` > > > > and: > > > > ``` > > LESS="" > > ``` > > > > The former causes Git to inject `FRX`, while the latter causes Git to > > leave the pager environment alone. > > Yes, that's because Git sets the environment iff it is unset. In the > latter case, it is not unset: it is set to a zero-length value. > > > I realize simply removing the default could have substantial > > compatibility consequences given how longstanding this behavior is. > > But perhaps it would be worth considering whether the automatic `LESS` > > default should: > > > > * apply only to Git's own default pager path > > * be suppressible explicitly through configuration; or > > * otherwise avoid affecting arbitrary custom `core.pager` commands. > > We can't know in the general case whether the pager is less or not. On > FreeBSD, `more` is less, for instance, and the pager command allows > arbitrary shell commands, so determining statically which branch is > taken is not always possible. Notably, Debian has `sensible-pager`, > which is the default on that OS, and may (or may not) be less. Hi Brian, Thanks for the detailed explanation. The FreeBSD "more" case and the arbitrary-shell-command nature of core.pager clarified some assumptions I was making about how feasible it would be for Git to distinguish "direct less" from wrappers or dynamic pager selection... That makes the compatibility argument much clearer. The suggested LESS="" delta override is useful to know about. Also, thank you for your work on Git. Best, Francisco Boni