From dc845cff94c75a1a413e9dd11f5ed0fce3252aa8 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Fri, 14 Mar 2008 23:22:41 +0100 Subject: Use 'git-rev-parse --git-dir' to determinate if we are on a .git managment folder or not. --- 01_Functions.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/01_Functions.zsh b/01_Functions.zsh index 99b8296..58a4ba5 100644 --- a/01_Functions.zsh +++ b/01_Functions.zsh @@ -85,7 +85,7 @@ get_git_status () { local my_git_status - if ( echo ${(s:/:)PWD} | grep "\.\" >/dev/null ) + if [ "$(git-rev-parse --git-dir)" == "." ] then my_git_status="$COLOR_GIT_MANAGMENT" elif [ "$(git-diff --cached 2>&- | grep '^diff ')" != "" ] ; then -- cgit v1.2.3