[PATCH v1.5 2/3] bash prompt: remove a redundant 'git diff' option
- From
SZEDER Gábor <szeder@ira.uka.de>
- Date
- Nov 21, 2015, 14:46 UTC
- Message-ID
- <1448117200-7299-1-git-send-email-szeder@ira.uka.de>
- In-Reply-To
- <1448105409-4494-2-git-send-email-szeder@ira.uka.de>
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> --- Reworded the Subject: line, because it sounded as if the patch were to remove a command line option of the bash prompt script.
The rest is unchanged.
contrib/completion/git-prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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
-- 2.6.3.402.geb6a0f7