From 0bbae0c320b1902ae5db332abbcbc01e068add29 Mon Sep 17 00:00:00 2001 From: Nikhil Gupta Date: Tue, 14 Oct 2014 16:50:14 +0530 Subject: [PATCH] avoided unnecessary git call from `git_prompt_status` --- lib/git.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git.zsh b/lib/git.zsh index 7aa5a0ea2..a6a998e36 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -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"