git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* "git branch" issue in 2.16.1
@ 2018-02-06 19:49 Jason Racey
  2018-02-06 19:57 ` Todd Zullinger
  2018-02-06 20:02 ` Paul Smith
  0 siblings, 2 replies; 15+ messages in thread
From: Jason Racey @ 2018-02-06 19:49 UTC (permalink / raw)
  To: git

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.

- Jason

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: "git branch" issue in 2.16.1
  2018-02-06 19:49 "git branch" issue in 2.16.1 Jason Racey
@ 2018-02-06 19:57 ` Todd Zullinger
  2018-02-06 20:05   ` Stefan Beller
  2018-02-06 20:02 ` Paul Smith
  1 sibling, 1 reply; 15+ messages in thread
From: Todd Zullinger @ 2018-02-06 19:57 UTC (permalink / raw)
  To: Jason Racey; +Cc: git

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.

-- 
Todd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Historian, n. A broad-gauge gossip.
    -- Ambrose Bierce, "The Devil's Dictionary"


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: "git branch" issue in 2.16.1
  2018-02-06 19:49 "git branch" issue in 2.16.1 Jason Racey
  2018-02-06 19:57 ` Todd Zullinger
@ 2018-02-06 20:02 ` Paul Smith
  1 sibling, 0 replies; 15+ messages in thread
From: Paul Smith @ 2018-02-06 20:02 UTC (permalink / raw)
  To: Jason Racey, git

On Tue, 2018-02-06 at 11:49 -0800, 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.

I think you mean that you're in the pager (less(1), most likely). 
Many/most Git commands that can generate a large amount of output (git
log, git diff, git show, etc.) will automatically send the output to a
pager so you can scroll through it easily.


The man page for git branch says:

  CONFIGURATION
       pager.branch is only respected when listing branches, i.e., when --list
       is used or implied. The default is to use a pager. See git-config(1).

So, if you never want to use the pager for git branch output you can
configure the pager.branch option to set it always off.

Or you can use "git branch | cat" so that stdout is not a terminal :).

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: "git branch" issue in 2.16.1
  2018-02-06 19:57 ` Todd Zullinger
@ 2018-02-06 20:05   ` Stefan Beller
  2018-02-07 17:54     ` Lars Schneider
  0 siblings, 1 reply; 15+ messages in thread
From: Stefan Beller @ 2018-02-06 20:05 UTC (permalink / raw)
  To: Todd Zullinger; +Cc: Jason Racey, git

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.

:-)

Stefan

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: "git branch" issue in 2.16.1
  2018-02-06 20:05   ` Stefan Beller
@ 2018-02-07 17:54     ` Lars Schneider
  2018-02-07 18:09       ` Jason Racey
  2018-02-07 20:08       ` Jeff King
  0 siblings, 2 replies; 15+ messages in thread
From: Lars Schneider @ 2018-02-07 17:54 UTC (permalink / raw)
  To: Stefan Beller; +Cc: Todd Zullinger, Jason Racey, git, Paul Smith


> 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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: "git branch" issue in 2.16.1
  2018-02-07 17:54     ` Lars Schneider
@ 2018-02-07 18:09       ` Jason Racey
  2018-02-07 19:55         ` Lars Schneider
  2018-02-07 20:08       ` Jeff King
  1 sibling, 1 reply; 15+ messages in thread
From: Jason Racey @ 2018-02-07 18:09 UTC (permalink / raw)
  To: Lars Schneider; +Cc: Stefan Beller, Todd Zullinger, git, Paul Smith

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


> 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
> 


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: "git branch" issue in 2.16.1
  2018-02-07 18:09       ` Jason Racey
@ 2018-02-07 19:55         ` Lars Schneider
  0 siblings, 0 replies; 15+ messages in thread
From: Lars Schneider @ 2018-02-07 19:55 UTC (permalink / raw)
  To: Jason Racey; +Cc: Stefan Beller, Todd Zullinger, git, Paul Smith


> On 07 Feb 2018, at 19:09, Jason Racey <jason@eluvio.com> wrote:
> 
> 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 ‘’
> 

That's great! Thank you. Can you share your exact OS version running
on your work and personal machine? Plus, what shell do you use and
what terminal application?

Thanks,
Lars


PS: Please don't top post on the git mailing list :-)
https://en.wikipedia.org/wiki/Posting_style


> Thanks!
> 
> - Jason
> 
> 
>> 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
>> 
> 


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: "git branch" issue in 2.16.1
  2018-02-07 17:54     ` Lars Schneider
  2018-02-07 18:09       ` Jason Racey
@ 2018-02-07 20:08       ` Jeff King
  2018-02-07 20:19         ` Junio C Hamano
  2018-02-07 22:20         ` Lars Schneider
  1 sibling, 2 replies; 15+ messages in thread
From: Jeff King @ 2018-02-07 20:08 UTC (permalink / raw)
  To: Lars Schneider
  Cc: Stefan Beller, Todd Zullinger, Jason Racey, git, Paul Smith

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
     defaults).

  3. "less" somehow behaves differently on macOS. The "F" behavior is
     quite old, but possibly there's some platform-specific bug.

-Peff

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: "git branch" issue in 2.16.1
  2018-02-07 20:08       ` Jeff King
@ 2018-02-07 20:19         ` Junio C Hamano
  2018-02-07 22:20         ` Lars Schneider
  1 sibling, 0 replies; 15+ messages in thread
From: Junio C Hamano @ 2018-02-07 20:19 UTC (permalink / raw)
  To: Jeff King
  Cc: Lars Schneider, Stefan Beller, Todd Zullinger, Jason Racey, git,
	Paul Smith

Jeff King <peff@peff.net> writes:

> 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.

4. Between your two runs, you do not have that many branches to fill
   the screen vertically in either case, but only in one case you
   have a branch with very long name (or perhaps "branch -l -v" made
   a line longer), and you have S and F in LESS environment.  The
   case that shows branches with short names will cause pager to
   exit at the end, while the other one, because it wants to allow
   you to scroll sideways, will not.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: "git branch" issue in 2.16.1
  2018-02-07 20:08       ` Jeff King
  2018-02-07 20:19         ` Junio C Hamano
@ 2018-02-07 22:20         ` Lars Schneider
  2018-02-08  8:50           ` Jeff King
  1 sibling, 1 reply; 15+ messages in thread
From: Lars Schneider @ 2018-02-07 22:20 UTC (permalink / raw)
  To: Jeff King; +Cc: Stefan Beller, Todd Zullinger, Jason Racey, git, Paul Smith


> On 07 Feb 2018, at 21:08, Jeff King <peff@peff.net> wrote:
> 
> 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.

I think that's it. On my system LESS is defined to "-R".

This opens the pager:

	$ echo "TEST" | less

This does not open the pager:

	$ echo "TEST" | less -FRX

That means "F" works on macOS but Git doesn't set it because LESS is
already in my environment.

Question is, why is LESS set that way on my system? I can't find
it in .bashrc .bash_profile .zshrc and friends.

- Lars


> 
>  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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: "git branch" issue in 2.16.1
  2018-02-07 22:20         ` Lars Schneider
@ 2018-02-08  8:50           ` Jeff King
  2018-02-08 11:13             ` Lars Schneider
  0 siblings, 1 reply; 15+ messages in thread
From: Jeff King @ 2018-02-08  8:50 UTC (permalink / raw)
  To: Lars Schneider
  Cc: Stefan Beller, Todd Zullinger, Jason Racey, git, Paul Smith

On Wed, Feb 07, 2018 at 11:20:08PM +0100, Lars Schneider wrote:

> >  1. You have $LESS in your environment (without "F") on one platform
> >     but not the other.
> 
> I think that's it. On my system LESS is defined to "-R".
> 
> This opens the pager:
> 
> 	$ echo "TEST" | less
> 
> This does not open the pager:
> 
> 	$ echo "TEST" | less -FRX
> 
> That means "F" works on macOS but Git doesn't set it because LESS is
> already in my environment.
> 
> Question is, why is LESS set that way on my system? I can't find
> it in .bashrc .bash_profile .zshrc and friends.

There's also /etc/bash.bashrc, /etc/profile, etc. I don't know what's
normal in the mac world. You can try running:

  bash -ix 2>&1 </dev/null | grep LESS

to see what your startup code is doing. I don't know of a good way to
correlate that with the source files, though. Or even to ask bash which
startup files it's looking in.

-Peff

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: "git branch" issue in 2.16.1
  2018-02-08  8:50           ` Jeff King
@ 2018-02-08 11:13             ` Lars Schneider
  2018-02-08 11:27               ` Lars Schneider
  0 siblings, 1 reply; 15+ messages in thread
From: Lars Schneider @ 2018-02-08 11:13 UTC (permalink / raw)
  To: Jeff King; +Cc: Stefan Beller, Todd Zullinger, Jason Racey, git, Paul Smith


> On 08 Feb 2018, at 09:50, Jeff King <peff@peff.net> wrote:
> 
> On Wed, Feb 07, 2018 at 11:20:08PM +0100, Lars Schneider wrote:
> 
>>> 1. You have $LESS in your environment (without "F") on one platform
>>>    but not the other.
>> 
>> I think that's it. On my system LESS is defined to "-R".
>> 
>> This opens the pager:
>> 
>> 	$ echo "TEST" | less
>> 
>> This does not open the pager:
>> 
>> 	$ echo "TEST" | less -FRX
>> 
>> That means "F" works on macOS but Git doesn't set it because LESS is
>> already in my environment.
>> 
>> Question is, why is LESS set that way on my system? I can't find
>> it in .bashrc .bash_profile .zshrc and friends.
> 
> There's also /etc/bash.bashrc, /etc/profile, etc. I don't know what's
> normal in the mac world. You can try running:
> 
>  bash -ix 2>&1 </dev/null | grep LESS
> 
> to see what your startup code is doing. I don't know of a good way to
> correlate that with the source files, though. Or even to ask bash which
> startup files it's looking in.

Unfortunately, this command doesn't work for me.

I ask around and most of my coworkers have LESS="-R".
Only the coworker that doesn't really use his Mac and has
no customizations does not have $LESS defined.

Therefore, I think it is likely some third party component
that sets $LESS.

@Jason:
Do you have homebrew, iTerm2, and/or oh-my-zsh installed?

- Lars

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: "git branch" issue in 2.16.1
  2018-02-08 11:13             ` Lars Schneider
@ 2018-02-08 11:27               ` Lars Schneider
  2018-02-08 16:19                 ` Kevin Daudt
  0 siblings, 1 reply; 15+ messages in thread
From: Lars Schneider @ 2018-02-08 11:27 UTC (permalink / raw)
  To: Jeff King; +Cc: Stefan Beller, Todd Zullinger, Jason Racey, git, Paul Smith


> On 08 Feb 2018, at 12:13, Lars Schneider <larsxschneider@gmail.com> wrote:
> 
> 
>> On 08 Feb 2018, at 09:50, Jeff King <peff@peff.net> wrote:
>> 
>> On Wed, Feb 07, 2018 at 11:20:08PM +0100, Lars Schneider wrote:
>> 
>>>> 1. You have $LESS in your environment (without "F") on one platform
>>>>   but not the other.
>>> 
>>> I think that's it. On my system LESS is defined to "-R".
>>> 
>>> This opens the pager:
>>> 
>>> 	$ echo "TEST" | less
>>> 
>>> This does not open the pager:
>>> 
>>> 	$ echo "TEST" | less -FRX
>>> 
>>> That means "F" works on macOS but Git doesn't set it because LESS is
>>> already in my environment.
>>> 
>>> Question is, why is LESS set that way on my system? I can't find
>>> it in .bashrc .bash_profile .zshrc and friends.
>> 
>> There's also /etc/bash.bashrc, /etc/profile, etc. I don't know what's
>> normal in the mac world. You can try running:
>> 
>> bash -ix 2>&1 </dev/null | grep LESS
>> 
>> to see what your startup code is doing. I don't know of a good way to
>> correlate that with the source files, though. Or even to ask bash which
>> startup files it's looking in.
> 
> Unfortunately, this command doesn't work for me.
> 
> I ask around and most of my coworkers have LESS="-R".
> Only the coworker that doesn't really use his Mac and has
> no customizations does not have $LESS defined.
> 
> Therefore, I think it is likely some third party component
> that sets $LESS.
> 
> @Jason:
> Do you have homebrew, iTerm2, and/or oh-my-zsh installed?

Ha. I found it it! It is indeed oh-my-zsh:
https://github.com/robbyrussell/oh-my-zsh/blob/master/lib/misc.zsh#L23

Let's see if oh-my-zsh is willing to change that...

- Lars

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: "git branch" issue in 2.16.1
  2018-02-08 11:27               ` Lars Schneider
@ 2018-02-08 16:19                 ` Kevin Daudt
  2018-02-08 16:28                   ` Lars Schneider
  0 siblings, 1 reply; 15+ messages in thread
From: Kevin Daudt @ 2018-02-08 16:19 UTC (permalink / raw)
  To: Lars Schneider
  Cc: Jeff King, Stefan Beller, Todd Zullinger, Jason Racey, git,
	Paul Smith

On Thu, Feb 08, 2018 at 12:27:07PM +0100, Lars Schneider wrote:
> 
> > On 08 Feb 2018, at 12:13, Lars Schneider <larsxschneider@gmail.com> wrote:
> > 
> > 
> >> On 08 Feb 2018, at 09:50, Jeff King <peff@peff.net> wrote:
> >> 
> >> On Wed, Feb 07, 2018 at 11:20:08PM +0100, Lars Schneider wrote:
> >> 
> >>>> 1. You have $LESS in your environment (without "F") on one platform
> >>>>   but not the other.
> >>> 
> >>> I think that's it. On my system LESS is defined to "-R".
> >>> 
> >>> This opens the pager:
> >>> 
> >>> 	$ echo "TEST" | less
> >>> 
> >>> This does not open the pager:
> >>> 
> >>> 	$ echo "TEST" | less -FRX
> >>> 
> >>> That means "F" works on macOS but Git doesn't set it because LESS is
> >>> already in my environment.
> >>> 
> >>> Question is, why is LESS set that way on my system? I can't find
> >>> it in .bashrc .bash_profile .zshrc and friends.
> >> 
> >> There's also /etc/bash.bashrc, /etc/profile, etc. I don't know what's
> >> normal in the mac world. You can try running:
> >> 
> >> bash -ix 2>&1 </dev/null | grep LESS
> >> 
> >> to see what your startup code is doing. I don't know of a good way to
> >> correlate that with the source files, though. Or even to ask bash which
> >> startup files it's looking in.
> > 
> > Unfortunately, this command doesn't work for me.
> > 
> > I ask around and most of my coworkers have LESS="-R".
> > Only the coworker that doesn't really use his Mac and has
> > no customizations does not have $LESS defined.
> > 
> > Therefore, I think it is likely some third party component
> > that sets $LESS.
> > 
> > @Jason:
> > Do you have homebrew, iTerm2, and/or oh-my-zsh installed?
> 
> Ha. I found it it! It is indeed oh-my-zsh:
> https://github.com/robbyrussell/oh-my-zsh/blob/master/lib/misc.zsh#L23
> 
> Let's see if oh-my-zsh is willing to change that...
> 
> - Lars

I've just added unset LESS in my .zshrc, but for most users it would be
better if they don't set it at all.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: "git branch" issue in 2.16.1
  2018-02-08 16:19                 ` Kevin Daudt
@ 2018-02-08 16:28                   ` Lars Schneider
  0 siblings, 0 replies; 15+ messages in thread
From: Lars Schneider @ 2018-02-08 16:28 UTC (permalink / raw)
  To: Kevin Daudt
  Cc: Jeff King, Stefan Beller, Todd Zullinger, Jason Racey, git,
	Paul Smith


> On 08 Feb 2018, at 17:19, Kevin Daudt <me@ikke.info> wrote:
> 
> On Thu, Feb 08, 2018 at 12:27:07PM +0100, Lars Schneider wrote:
>> 
>>> On 08 Feb 2018, at 12:13, Lars Schneider <larsxschneider@gmail.com> wrote:
>>> 
>>> 
>>>> On 08 Feb 2018, at 09:50, Jeff King <peff@peff.net> wrote:
>>>> 
>>>> On Wed, Feb 07, 2018 at 11:20:08PM +0100, Lars Schneider wrote:
>>>> 
>>>>>> 1. You have $LESS in your environment (without "F") on one platform
>>>>>>  but not the other.
>>>>> 
>>>>> I think that's it. On my system LESS is defined to "-R".
>>>>> 
>>>>> This opens the pager:
>>>>> 
>>>>> 	$ echo "TEST" | less
>>>>> 
>>>>> This does not open the pager:
>>>>> 
>>>>> 	$ echo "TEST" | less -FRX
>>>>> 
>>>>> That means "F" works on macOS but Git doesn't set it because LESS is
>>>>> already in my environment.
>>>>> 
>>>>> Question is, why is LESS set that way on my system? I can't find
>>>>> it in .bashrc .bash_profile .zshrc and friends.
>>>> 
>>>> There's also /etc/bash.bashrc, /etc/profile, etc. I don't know what's
>>>> normal in the mac world. You can try running:
>>>> 
>>>> bash -ix 2>&1 </dev/null | grep LESS
>>>> 
>>>> to see what your startup code is doing. I don't know of a good way to
>>>> correlate that with the source files, though. Or even to ask bash which
>>>> startup files it's looking in.
>>> 
>>> Unfortunately, this command doesn't work for me.
>>> 
>>> I ask around and most of my coworkers have LESS="-R".
>>> Only the coworker that doesn't really use his Mac and has
>>> no customizations does not have $LESS defined.
>>> 
>>> Therefore, I think it is likely some third party component
>>> that sets $LESS.
>>> 
>>> @Jason:
>>> Do you have homebrew, iTerm2, and/or oh-my-zsh installed?
>> 
>> Ha. I found it it! It is indeed oh-my-zsh:
>> https://github.com/robbyrussell/oh-my-zsh/blob/master/lib/misc.zsh#L23
>> 
>> Let's see if oh-my-zsh is willing to change that...
>> 
>> - Lars
> 
> I've just added unset LESS in my .zshrc, but for most users it would be
> better if they don't set it at all.

I proposed this instead:
https://github.com/robbyrussell/oh-my-zsh/pull/6611

Maybe you can chime in there?

Thanks,
Lars


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-02-08 16:28 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-06 19:49 "git branch" issue in 2.16.1 Jason Racey
2018-02-06 19:57 ` Todd Zullinger
2018-02-06 20:05   ` Stefan Beller
2018-02-07 17:54     ` Lars Schneider
2018-02-07 18:09       ` Jason Racey
2018-02-07 19:55         ` Lars Schneider
2018-02-07 20:08       ` Jeff King
2018-02-07 20:19         ` Junio C Hamano
2018-02-07 22:20         ` Lars Schneider
2018-02-08  8:50           ` Jeff King
2018-02-08 11:13             ` Lars Schneider
2018-02-08 11:27               ` Lars Schneider
2018-02-08 16:19                 ` Kevin Daudt
2018-02-08 16:28                   ` Lars Schneider
2018-02-06 20:02 ` Paul Smith

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).