Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not working check git in folder #127

Open
madmandarin opened this issue Oct 9, 2018 · 2 comments
Open

not working check git in folder #127

madmandarin opened this issue Oct 9, 2018 · 2 comments

Comments

@madmandarin
Copy link

in all folder i have "(:|✔)"
fix this change if [ -n "$__CURRENT_GIT_STATUS" ] to if [ -n "$__CURRENT_GIT_STATUS" ] && [ "$GIT_BRANCH" != ":" ]
git version 2.19.1
arch linux

@Felixoid
Copy link

Felixoid commented Oct 9, 2018

@madmandarin take a look on https://github.com/starcraftman/zsh-git-prompt
This repo wasn't updated in ages

@gburger11
Copy link

gburger11 commented Nov 7, 2018

I had the same issue when switching from Ubuntu 14.04 to Ubuntu 18.04.

I have solved it manually on my computer. It seems git has changed the error message displayed when calling git symbolic-ref HEAD in a non-git repository. It was fatal: Not a git repository and they removed the capital n of Not. As a consequence, gitstatus.py does exit anymore when in a non-git folder via the check:

if 'fatal: Not a git repository' in error_string:
	sys.exit(0)

I have used a regexp with a the argument to ignore case to replace the inclusion check:

if re.search(r'fatal: not a git repository', error_string, re.IGNORECASE):
    sys.exit(0)

gburger11 added a commit to gburger11/zsh-git-prompt that referenced this issue Nov 7, 2018
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

No branches or pull requests

3 participants