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:
parent
a30d11ebdf
commit
0af9f7ecb8
@ -476,7 +476,7 @@ __git_ps1 ()
|
||||
if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ] &&
|
||||
[ "$(git config --bool bash.showDirtyState)" != "false" ]
|
||||
then
|
||||
git diff --no-ext-diff --quiet --exit-code || w="*"
|
||||
git diff --no-ext-diff --quiet || w="*"
|
||||
if [ -n "$short_sha" ]; then
|
||||
git diff-index --cached --quiet HEAD -- || i="+"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user