bashstrap icon indicating copy to clipboard operation
bashstrap copied to clipboard

Shows incorrect 'dirty' indication for Git repository

Open purezen opened this issue 8 years ago • 4 comments

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.

purezen avatar Feb 07 '17 13:02 purezen

@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

sergeyvolkov avatar Feb 28 '17 09:02 sergeyvolkov

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?

rkrv avatar May 22 '17 14:05 rkrv

@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

Shagon94 avatar Dec 19 '18 10:12 Shagon94

This has been addressed in MustyMouse/bashstrap#1

brettkrueger avatar May 22 '19 22:05 brettkrueger