summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2008-03-14 23:22:41 +0100
committerHugues Hiegel <hugues@hiegel.fr>2008-03-14 23:22:41 +0100
commitdc845cff94c75a1a413e9dd11f5ed0fce3252aa8 (patch)
tree440a4def1ff65f700b8c5fc345cae084d75c2926
parent692831f72cd77e466037e14af5114e0f0b06c566 (diff)
Use 'git-rev-parse --git-dir' to determinate
if we are on a .git managment folder or not.
-rw-r--r--01_Functions.zsh2
1 files changed, 1 insertions, 1 deletions
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 "\.\<git\>" >/dev/null )
+ if [ "$(git-rev-parse --git-dir)" == "." ]
then
my_git_status="$COLOR_GIT_MANAGMENT"
elif [ "$(git-diff --cached 2>&- | grep '^diff ')" != "" ] ; then