From 5f0a11823de8107ecb72104f974fb96882ae3249 Mon Sep 17 00:00:00 2001 From: Yehor Lvivski Date: Fri, 8 Nov 2013 02:46:53 +0200 Subject: [PATCH] fix upstream --- prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prompt.sh b/prompt.sh index 589f553..384f736 100644 --- a/prompt.sh +++ b/prompt.sh @@ -66,7 +66,7 @@ function build_prompt { just_init=true else upstream=$(git rev-parse --symbolic-full-name --abbrev-ref @{upstream} 2> /dev/null) - if [[ $upstream != '@{upstream}' ]]; then has_upstream=true; else has_upstream=false; upstream=''; fi + if [[ -n $upstream ]]; then has_upstream=true; else has_upstream=false; fi git_status=$(git status --porcelain 2> /dev/null)