diff options
Diffstat (limited to 'bash/bashrc.d/prompt.bash')
-rw-r--r-- | bash/bashrc.d/prompt.bash | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash index e8429b26..843c5ce4 100644 --- a/bash/bashrc.d/prompt.bash +++ b/bash/bashrc.d/prompt.bash @@ -101,6 +101,9 @@ prompt() { iswt=$(git rev-parse --is-inside-work-tree 2>/dev/null) [[ $iswt = true ]] || return + # Refresh index so e.g. git-diff-files(1) is accurate + git update-index --refresh >/dev/null + # Find a local branch, remote branch, or tag (annotated or not), or # failing all of that just show the short commit ID, in that order # of preference; if none of that works, bail out @@ -110,9 +113,6 @@ prompt() { name=${name##*/} [[ -n $name ]] || return - # Refresh index so e.g. git-diff-files(1) is accurate - git update-index --refresh >/dev/null - # Check various files in .git to flag processes local proc [[ -d .git/rebase-merge || -d .git/rebase-apply ]] && |