#! /usr/bin/zsh
-git_parse() {
+export __ZSH_GIT_BASEDIR=""
+export __ZSH_GIT_BRANCH=""
+export __ZSH_GIT_SUBDIR=""
+export __ZSH_GIT_STATE=""
+export __ZSH_GIT_VARS_INVALID=1
- psvar=()
+git_parse() {
local git_dir ref base_dir sub_dir action branch
+
git_dir=$(git rev-parse --git-dir 2> /dev/null) || return
base_dir=${$(readlink -f "$git_dir/..")/$HOME/'~'}