aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
Diffstat (limited to 'bash')
-rw-r--r--bash/bashrc.d/prompt.bash3
1 files changed, 3 insertions, 0 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash
index 081cff69..3b0578ba 100644
--- a/bash/bashrc.d/prompt.bash
+++ b/bash/bashrc.d/prompt.bash
@@ -122,6 +122,9 @@ prompt() {
fi
branch=${branch##*/}
+ # Refresh index so e.g. git-diff-files(1) is accurate
+ git update-index --refresh >/dev/null
+
# Collect symbols representing repository state
local state
if ! git diff-files --quiet ; then