diff options
author | Yoav Weiss <yoav@yoav.ws> | 2013-01-27 14:50:33 +0100 |
---|---|---|
committer | Yoav Weiss <yoav@yoav.ws> | 2013-01-27 14:50:33 +0100 |
commit | 2e213b9b8f96722d4978a80ae53849fec437eb10 (patch) | |
tree | 0ee20ff86fa0203b70269062416eb8e77e6034d2 /lib | |
parent | 615e41b0ecdb25acba513fd09619bd56c2eb24eb (diff) | |
download | zsh-2e213b9b8f96722d4978a80ae53849fec437eb10.tar.gz zsh-2e213b9b8f96722d4978a80ae53849fec437eb10.tar.bz2 zsh-2e213b9b8f96722d4978a80ae53849fec437eb10.zip |
Faster dirty git status check (using git diff)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/git.zsh | 2 |
1 files changed, 1 insertions, 1 deletions
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" |