diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/completion/git-prompt.sh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh index 7a95fbdcfd..64219e631a 100644 --- a/contrib/completion/git-prompt.sh +++ b/contrib/completion/git-prompt.sh @@ -477,9 +477,8 @@ __git_ps1 () [ "$(git config --bool bash.showDirtyState)" != "false" ] then git diff --no-ext-diff --quiet || w="*" - if [ -n "$short_sha" ]; then - git diff-index --cached --quiet HEAD -- || i="+" - else + git diff --no-ext-diff --cached --quiet || i="+" + if [ -z "$short_sha" ] && [ -z "$i" ]; then i="#" fi fi |