From 668d3a04a8ebfc47f79aec7a2a453c9cb15ce4dc Mon Sep 17 00:00:00 2001 From: Eugen Kuksa Date: Thu, 4 Dec 2014 16:18:39 +0100 Subject: [PATCH] Move `git-dir` - only call it in working copies. --- modules/git/functions/git-info | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/git/functions/git-info b/modules/git/functions/git-info index 46708bc2..21521466 100644 --- a/modules/git/functions/git-info +++ b/modules/git/functions/git-info @@ -95,8 +95,6 @@ function git-info { setopt LOCAL_OPTIONS setopt EXTENDED_GLOB - local git_dir="$(git-dir)" - local action local action_format local action_formatted @@ -170,6 +168,8 @@ function git-info { return 1 fi + local git_dir="$(git-dir)" + if (( $# > 0 )); then if [[ "$1" == [Oo][Nn] ]]; then git config --bool prompt.showinfo true