bash prompt: remove a redundant 'git diff' option

To get the dirty state indicator __git_ps1() runs 'git diff' with
'--quiet --exit-code' options.  '--quiet' already implies
'--exit-code', so the latter is unnecessary and can be removed.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Jeff King <peff@peff.net>
This commit is contained in:
SZEDER Gábor 2015-11-21 15:46:40 +01:00 committed by Jeff King
parent a30d11ebdf
commit 0af9f7ecb8

View File

@ -476,7 +476,7 @@ __git_ps1 ()
if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ] && if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ] &&
[ "$(git config --bool bash.showDirtyState)" != "false" ] [ "$(git config --bool bash.showDirtyState)" != "false" ]
then then
git diff --no-ext-diff --quiet --exit-code || w="*" git diff --no-ext-diff --quiet || w="*"
if [ -n "$short_sha" ]; then if [ -n "$short_sha" ]; then
git diff-index --cached --quiet HEAD -- || i="+" git diff-index --cached --quiet HEAD -- || i="+"
else else