From a0278ad0404e8f5f3f76dbc2fb5617d1e2845ddc Mon Sep 17 00:00:00 2001 From: sonnym Date: Fri, 30 Mar 2012 13:25:39 -0400 Subject: [PATCH] fix broken equality check when outside git repo --- lib/git.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git.zsh b/lib/git.zsh index 86f46ed5d..915575246 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -4,7 +4,7 @@ function git_prompt_info() { if [ -z $ref ]; then # check if in detached HEAD mode branch_name=$(git status -sb $(git_submodule_syntax) 2> /dev/null) - if [ $branch_name = "## HEAD (no branch)" ]; then + if [ "$branch_name" = "## HEAD (no branch)" ]; then # set tag name if found tag_name=$(git name-rev --name-only $(git --no-pager show --stat 2> /dev/null | head -n 1 | awk '{ print $2 }') 2> /dev/null) if [ -z $tag_name ]; then