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

Re: "git branch" issue in 2.16.1

From
JRJason Racey <jason@eluvio.com>
Date
Feb 7, 2018, 18:09 UTC
Message-ID
<4F1475A5-DBD4-484A-9AB6-4DA57A8B8C7B@eluvio.com>
In-Reply-To
<5A7788B0-6250-4D1F-A86D-E3155C03EF0C@gmail.com>
Hi Lars,
Here’s what I’m certain of:
1. Just set up a new MacBook Pro at work. Git version 2.16.1 installed via Homebrew. “git branch” command always displays the list of branches in the less pager, regardless of number of branches or screen size. I’ve never seen this happen before.
2. Checked the “git branch” behavior on my personal MacBook Pro. Git version there is 2.16.0. Does not have this always paging behavior.
3. Ran "brew upgrade git" on personal MacBook Pro. Git upgraded to 2.16.1.
4. Checked the “git branch” behavior on my personal MacBook Pro after version upgrade. Pager now always used regardless of number of branches or screen size. Oh no! Seems like there might be a bug in the new version, better email the git bug list in just to be safe.
5. Meanwhile research problem on Stack Overflow. Mitigated (though not really fixed) issue on both machines with this command: git config --global core.pager ‘’
Thanks!
- Jason
Show 55 quoted lines
> On Feb 7, 2018, at 9:54 AM, Lars Schneider <larsxschneider@gmail.com> wrote:
> 
> 
>> On 06 Feb 2018, at 21:05, Stefan Beller <sbeller@google.com> wrote:
>> 
>> On Tue, Feb 6, 2018 at 11:57 AM, Todd Zullinger <tmz@pobox.com> wrote:
>>> Hi Jason,
>>> 
>>> Jason Racey wrote:
>>>> After upgrading git from 2.16.0 to 2.16.1 (via Homebrew -
>>>> I’m on macOS) I noticed that the “git branch” command
>>>> appears to display the branch listing in something similar
>>>> to a vi editor - though not quite the same. I don’t know
>>>> the technical term for this state. You can’t actually edit
>>>> the output of the command, but you’re in a state where you
>>>> have to type “q” to exit and then the list disappears.
>>>> It’s very inconvenient and it doesn’t seem like it was by
>>>> design. I’m using zsh in iTerm2 if that helps. Thanks.
>>> 
>>> In 2.16.0 `git branch --list` is sent to a pager by default.
>>> (Without arguments, --list is the default, so this applies
>>> to `git branch`).
>>> 
>>> You can set pager.branch to false to disable this in the
>>> config, or use git --no-pager branch to do so for a single
>>> invocation.
>>> 
>>> I can't say why you're seeing this with 2.16.1 and not
>>> 2.16.0, but I'm not familiar with homebrew, so perhaps
>>> something didn't work as intended in 2.16.0.
>>> 
>> 
>> 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.
> 
> @Jason: That might be a bug on macOS. However, I am surprised
> you only noticed it after upgrading from 2.16.0 to 2.16.1.
> Do you recall anything else you've changed?
> 
> - Lars
> 
Previous: Lars SchneiderNext: Lars Schneider
Message 5 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.