Re: "git branch" issue in 2.16.1
- Date: Wed, 7 Feb 2018 15:08:59 -0500
- From: Jeff King <peff@xxxxxxxx>
- Subject: Re: "git branch" issue in 2.16.1
On Wed, Feb 07, 2018 at 06:54:23PM +0100, Lars Schneider wrote:
> > 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
3. "less" somehow behaves differently on macOS. The "F" behavior is
quite old, but possibly there's some platform-specific bug.