diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2009-06-19 21:05:48 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2009-06-19 21:05:48 +0000 |
commit | a5417250d52320f25ffe9c2394a415013dbf03f0 (patch) | |
tree | 799a9993ad1af2384ee8071200a195cb417fdb2a /Functions/VCS_Info/Backends/VCS_INFO_get_data_git | |
parent | a1fc66a3cde9c10f7ddf0f6ec301d29698a2b826 (diff) | |
download | zsh-a5417250d52320f25ffe9c2394a415013dbf03f0.tar.gz zsh-a5417250d52320f25ffe9c2394a415013dbf03f0.tar.xz zsh-a5417250d52320f25ffe9c2394a415013dbf03f0.zip |
Frank Terbeck: 27049, 27050, 27051, 27052: VCS_INFO improvements
Diffstat (limited to 'Functions/VCS_Info/Backends/VCS_INFO_get_data_git')
-rw-r--r-- | Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git index a536165e1..33e76d44f 100644 --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git @@ -135,7 +135,9 @@ if [[ -z ${gitdir} ]] || [[ -z ${gitbranch} ]] ; then return 1 fi -if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" "check-for-changes" ; then +if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" "check-for-changes" && \ + [[ "$(git rev-parse --is-inside-git-dir 2> /dev/null)" != 'true' ]] && \ + git rev-parse --quiet --verify HEAD &> /dev/null ; then # Default: off - these are potentially expensive on big repositories ${vcs_comm[cmd]} diff --no-ext-diff --ignore-submodules --quiet --exit-code || gitunstaged=1 |