Skip to content

Conversation

@quinnypig
Copy link

Git 2.17.0 changes the "n" in this string from upper to lower case, which in turn caused an empty git status prompt when not in a checked-out git repository. This patch addresses both scenarios.
Yes, it was as annoying to track down as you probably think.

Git 2.17.0 changes the "n" in this string from upper to lower case, which in turn caused an empty git status prompt when not in a checked-out git repository. This patch addresses both scenarios. 
Yes, it was as annoying to track down as you probably think.
error_string = error.decode('utf-8')

if 'fatal: Not a git repository' in error_string:
if 'fatal: Not a git repository' in error_string.lower():
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not -> not

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as @peikk0 said 'fatal: Not a git repository' should be 'fatal: not a git repository'

@NicolasCARPi
Copy link

Too bad this repo is unmaintained :/

Thanks for the PR anyway :)

@Felixoid
Copy link

Hi. There is the better fix in #119

mttrs added a commit to mttrs/zsh-git-prompt that referenced this pull request Apr 29, 2018
From git 2.17.0, it appears that the error string changes.
olivierverdier#117
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants