Permalink
Browse files

.bash_prompt: Fix `parse_git_dirty` for Git v1.8.0+

Git 1.8.0+ says “nothing to commit (working directory clean)”.
Older Git versions return “nothing to commit (working directory clean)”.

Thanks to @nicolahery in #143 for the suggestion.
  • Loading branch information...
1 parent a9221be commit 391eb8d5752ebec8f649aed40d51b7949a8b5695 @mathiasbynens committed Nov 23, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 .bash_prompt
View
@@ -44,7 +44,7 @@ export BOLD
export RESET
function parse_git_dirty() {
- [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
+ [[ $(git status 2> /dev/null | tail -n1) != *"working directory clean"* ]] && echo "*"
}
function parse_git_branch() {

0 comments on commit 391eb8d

Please sign in to comment.