From 8e57bc299de7e1cda122d3568946e687f5e48dd5 Mon Sep 17 00:00:00 2001 From: Srihari Date: Tue, 21 Feb 2012 17:23:10 +0530 Subject: [PATCH] Rearranging code to first define function , use it and then unset it. Fix typo in unsetting git_compare_version --- lib/git.zsh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/git.zsh b/lib/git.zsh index d90f0f315..b67ed8b52 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -69,11 +69,6 @@ git_prompt_status() { echo $STATUS } -#this is unlikely to change so make it all statically assigned -POST_1_7_2_GIT=$(git_compare_version "1.7.2") -#clean up the namespace slightly by removing the checker function -unset -f git_compare_version() - #compare the provided version of git to the version installed and on path #prints 1 if input version <= installed version #prints -1 otherwise @@ -92,5 +87,9 @@ function git_compare_version() { done echo 1 } +#this is unlikely to change so make it all statically assigned +POST_1_7_2_GIT=$(git_compare_version "1.7.2") +#clean up the namespace slightly by removing the checker function +unset -f git_compare_version