starcraftman / zsh-git-prompt

[Active Fork] Informative git prompt for zsh
MIT License
58 stars 15 forks source link

(:|✓) shows when not in git repository. #23

Closed kierun closed 6 years ago

kierun commented 6 years ago

I am getting a (:|✓) in all directory (including ~). This is due to a very simple bug, see patch below:

diff --git a/gitstatus.py b/gitstatus.py
index d944fd4..28bdad4 100755
--- a/gitstatus.py
+++ b/gitstatus.py
@@ -12,7 +12,7 @@ branch, error = gitsym.communicate()

 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():
        sys.exit(0)

 branch = branch.decode("utf-8").strip()[11:]

Do you want me to make a PR for this?

starcraftman commented 6 years ago

@kierun Are you sure you are in fact using this repository? There is no current use of sys.exit in that file.

I think you are using the master from Olivier, you will have to delete it and clone this one. I don't have maintainer rights to Olivier's repo.

starcraftman commented 6 years ago

It been two days, I'm marking as invalid and closing. If you still experiencing, please be certain using this site. I know this bug patched. Remove your current zsh-git-prompt folder and reclone with:

git clone https://github.com/starcraftman/zsh-git-prompt
kierun commented 6 years ago

Ah! I do apologies. It was a stupid git submodule conflict that I failed to resolved properly in my dotfile repository. Sorry to have wasted your time.

Many thanks for your hard work. It is really appreciated.

starcraftman commented 6 years ago

No problem, have fun!