aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bash/bashrc.d/prompt.bash2
-rw-r--r--pdksh/pdkshrc.d/prompt.pdksh2
2 files changed, 2 insertions, 2 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash
index 3fc7ad13..69801b90 100644
--- a/bash/bashrc.d/prompt.bash
+++ b/bash/bashrc.d/prompt.bash
@@ -130,7 +130,7 @@ prompt() {
state=${state}'!'
# Changes are staged
- git diff-index --cached --quiet HEAD ||
+ git diff-index --cached --quiet HEAD 2>/dev/null ||
state=${state}'+'
# There are some untracked and unignored files
diff --git a/pdksh/pdkshrc.d/prompt.pdksh b/pdksh/pdkshrc.d/prompt.pdksh
index 8504153c..15db69cb 100644
--- a/pdksh/pdkshrc.d/prompt.pdksh
+++ b/pdksh/pdkshrc.d/prompt.pdksh
@@ -123,7 +123,7 @@ prompt() {
state=${state}'!!'
# Changes are staged
- git diff-index --cached --quiet HEAD ||
+ git diff-index --cached --quiet HEAD 2>/dev/null ||
state=${state}'+'
# There are some untracked and unignored files