From 2e213b9b8f96722d4978a80ae53849fec437eb10 Mon Sep 17 00:00:00 2001 From: Yoav Weiss Date: Sun, 27 Jan 2013 14:50:33 +0100 Subject: [PATCH] Faster dirty git status check (using git diff) --- lib/git.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git.zsh b/lib/git.zsh index 3e14695bd..d818c742d 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -13,7 +13,7 @@ parse_git_dirty() { if [[ $POST_1_7_2_GIT -gt 0 ]]; then SUBMODULE_SYNTAX="--ignore-submodules=dirty" fi - if [[ -n $(git status -s ${SUBMODULE_SYNTAX} 2> /dev/null) ]]; then + if [[ -n $(git diff --ignore-submodules HEAD 2> /dev/null) ]]; then echo "$ZSH_THEME_GIT_PROMPT_DIRTY" else echo "$ZSH_THEME_GIT_PROMPT_CLEAN"