aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/prompt.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-23 17:31:19 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-23 17:31:19 +1200
commit95554dc7862f770ee2ec26cc86e81f2d3fc66e52 (patch)
tree9db3c4602802e6485e41583e30ae03f3568695b8 /bash/bashrc.d/prompt.bash
parentCorrect test written in previous commit (diff)
downloaddotfiles-95554dc7862f770ee2ec26cc86e81f2d3fc66e52.tar.gz
dotfiles-95554dc7862f770ee2ec26cc86e81f2d3fc66e52.zip
If HEAD not set, suppress error
Diffstat (limited to 'bash/bashrc.d/prompt.bash')
-rw-r--r--bash/bashrc.d/prompt.bash2
1 files changed, 1 insertions, 1 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