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

Shows incorrect 'dirty' indication for Git repository #20

Open
purezen opened this issue Feb 7, 2017 · 4 comments
Open

Shows incorrect 'dirty' indication for Git repository #20

purezen opened this issue Feb 7, 2017 · 4 comments

Comments

@purezen
Copy link

purezen commented Feb 7, 2017

The prompt was working as intended since long. But lately, it's showing the * indication for clean repositories too. Behaviour is recurring even on a fresh OS install.

Details:
OS: Mac OS Sierra. Was also happening on El Capitan recently.

@sergeyvolkov
Copy link

@purezen
It happens, because script tries to find substring working directory clean in git status output.
This text was returned in git v1.9.1, but now git v2.10.1 returns working tree clean.

You can replace text in your .bash_profile: https://github.com/barryclark/bashstrap/blob/master/.bash_profile#L77

@rkrv
Copy link

rkrv commented May 22, 2017

Would be nice to have this updated in the .bash_profile file. There is even a pull request for it. Is this project still maintained?

@Shagon94
Copy link

@rkrv
@purezen
The parse_git_dirty function can be fixed by replacing it with:

parse_git_dirty() {
  [[ -n "$(git status -s 2> /dev/null)" ]] && echo "*"
}

much less operations and it works as expected

@brettkrueger
Copy link

This has been addressed in MustyMouse/bashstrap#1

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

5 participants