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>
SZEDER Gábor committed
Nov 21, 2015 at 15:46 UTC
0af9f7ecb8648ab1c6a090913e3df4a39f7c6754
1 file changed
+1
-1
contrib/completion/git-prompt.sh
+1
-1
@@ -476,7 +476,7 @@ __git_ps1 ()
476
if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ] &&
477
[ "$(git config --bool bash.showDirtyState)" != "false" ]
478
then
479
- git diff --no-ext-diff --quiet --exit-code || w="*"
479
+ git diff --no-ext-diff --quiet || w="*"
480
if [ -n "$short_sha" ]; then
481
git diff-index --cached --quiet HEAD -- || i="+"
482
else