From 9b2334cf558b7537047d40c239acc07dcecd5232 Mon Sep 17 00:00:00 2001 From: Frank Terbeck Date: Mon, 19 Jul 2010 19:20:27 +0000 Subject: 28093, based on Michel Lespinasse: 28090: Fix a problem with `check-for-changes' and freshly initialised repositories. --- Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Functions') diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git index 778d0610b..9765a6e5a 100644 --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git @@ -121,8 +121,8 @@ if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" "check-for-changes" && \ # Default: off - these are potentially expensive on big repositories ${vcs_comm[cmd]} diff --no-ext-diff --ignore-submodules --quiet --exit-code || gitunstaged=1 - ${vcs_comm[cmd]} diff-index --cached --quiet --ignore-submodules HEAD || - gitstaged=1 + ${vcs_comm[cmd]} diff-index --cached --quiet --ignore-submodules HEAD 2> /dev/null + (( $? && $? != 128 )) && gitstaged=1 fi VCS_INFO_adjust -- cgit 1.4.1