diff options
author | SZEDER Gábor <szeder@ira.uka.de> | 2015-11-21 15:46:40 +0100 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2015-11-24 15:27:01 -0500 |
commit | 0af9f7ecb8648ab1c6a090913e3df4a39f7c6754 (patch) | |
tree | db382ad2e720930fcc7d409ccd712186474792e4 /contrib | |
parent | bash prompt: test dirty index and worktree while on an orphan branch (diff) | |
download | tgif-0af9f7ecb8648ab1c6a090913e3df4a39f7c6754.tar.xz |
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>
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/completion/git-prompt.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh index 07b52bedf1..7a95fbdcfd 100644 --- a/contrib/completion/git-prompt.sh +++ b/contrib/completion/git-prompt.sh @@ -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 |