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

Re: "git branch" issue in 2.16.1

From
Jeff King <peff@peff.net>
Date
Feb 7, 2018, 20:08 UTC
Message-ID
<20180207200859.GA9141@sigill.intra.peff.net>
In-Reply-To
<5A7788B0-6250-4D1F-A86D-E3155C03EF0C@gmail.com>
On Wed, Feb 07, 2018 at 06:54:23PM +0100, Lars Schneider wrote:
Show 16 quoted lines
> > Maybe the number of branches changed since then?
> > As the pager only comes to life when the output fills
> > more than your screen. Quick workarounds:
> > * buy a bigger screen
> > * have fewer branches.
> 
> Hmmm... there might be more to it. I just noticed the
> pager behavior on macOS, too. Consider this call:
> 
> $ git diff --shortstat
> 
> This should generate at most one line of output. On Linux
> the pager is never used. On macOS the pager is always used.
> 
> I tried older versions of Git on macOS and experienced the
> same behavior.

Keep in mind that we always run the pager, since we don't know ahead of time how much output will be generated. It's just that with certain configurations of "less", it may exit if it sees EOF before there's a whole screen worth of data.

This is controlled by the "-F" option. By default, Git will set LESS=FRX in the environment if you do not already have a $LESS environment. So some other possibilities are:

  1. You have $LESS in your environment (without "F") on one platform
     but not the other.
  2. Git was built with a different PAGER_ENV Makefile variable on one
     platform versus the other (that's what controls the baked-in LESS
     defaults).
  3. "less" somehow behaves differently on macOS. The "F" behavior is
     quite old, but possibly there's some platform-specific bug.
-Peff
Previous: Lars SchneiderNext: Junio C Hamano
Message 7 of 15 in “"git branch" issue in 2.16.1”
  1. Jason RaceyFeb 6, 2018
  2. Todd ZullingerFeb 6, 2018
  3. Stefan BellerFeb 6, 2018
  4. Lars SchneiderFeb 7, 2018
  5. Jason RaceyFeb 7, 2018
  6. Lars SchneiderFeb 7, 2018
  7. Jeff KingFeb 7, 2018
  8. Junio C HamanoFeb 7, 2018
  9. Lars SchneiderFeb 7, 2018
  10. Jeff KingFeb 8, 2018
  11. Lars SchneiderFeb 8, 2018
  12. Lars SchneiderFeb 8, 2018
  13. Kevin DaudtFeb 8, 2018
  14. Lars SchneiderFeb 8, 2018
  15. Paul SmithFeb 6, 2018

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.