santagada / xontrib-powerline

Powerline for Xonsh shell
MIT License
49 stars 20 forks source link

Bug: existence of curr_branch is assumed as a git repo #15

Open BYK opened 6 years ago

BYK commented 6 years ago

I'm using both Git and Mercurial and getting fatal: Not a git repository error when I'm inside Mercurial repos. Looks like the reason is https://github.com/santagada/xontrib-powerline/blob/master/xontrib/powerline.xsh#L67 assuming curr_branch always being a Git repository, which is not the case.

I'm willing to submit a PR to fix this.