From 2c9af0c7d56080bf9bbd60c35e1e8b0bc697ad8f Mon Sep 17 00:00:00 2001 From: LFDM <1986gh@gmail.com> Date: Sun, 5 Jan 2014 17:47:58 +0100 Subject: [PATCH] Making sha variable private. --- lib/git.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/git.zsh b/lib/git.zsh index 0cdbc5d72..fdbad74bf 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -73,8 +73,9 @@ git_is_clean() { # Shows the long git sha, pass in --short to get it shortened git_prompt_sha() { - SHA=$(command git rev-parse $1 HEAD 2> /dev/null) && \ - echo "$ZSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$ZSH_THEME_GIT_PROMPT_SHA_AFTER" + local sha + sha=$(command git rev-parse $1 HEAD 2> /dev/null) && \ + echo "$ZSH_THEME_GIT_PROMPT_SHA_BEFORE$sha$ZSH_THEME_GIT_PROMPT_SHA_AFTER" } # The following are kept for backwards compatibility