avoided unnecessary git call from git_prompt_status

This commit is contained in:
Nikhil Gupta 2014-10-14 16:50:14 +05:30
commit 0bbae0c320

View file

@ -79,7 +79,7 @@ function git_prompt_long_sha() {
# Get the status of the working tree
git_prompt_status() {
INDEX=$(command git status --porcelain -b 2> /dev/null)
INDEX=$(command git status --porcelain -b 2> /dev/null) || return 1
STATUS=""
if $(echo "$INDEX" | grep -E '^\?\? ' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_PROMPT_UNTRACKED$STATUS"