From c1dfabba696b8246209fdc15d3c3d3f0261fd968 Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Sun, 1 Apr 2012 20:27:37 -0700 Subject: [PATCH] lib/git.zsh: Allow users to opt-out of git version checks If we pre-define POST_GIT_1_7_2 then we can skip out on an extra call to `git version`. --- lib/git.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/git.zsh b/lib/git.zsh index 96598cf5f..b8b5bab61 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -134,8 +134,8 @@ function git_compare_version() { } #this is unlikely to change so make it all statically assigned -POST_1_7_2_GIT=$(git_compare_version "1.7.2") +if [[ -z "$POST_1_7_2_GIT" ]]; then + POST_1_7_2_GIT=$(git_compare_version "1.7.2") +fi #clean up the namespace slightly by removing the checker function unset -f git_compare_version - -