From: Oleg Broytman Date: Mon, 14 Dec 2020 21:14:35 +0000 (+0300) Subject: Fix(bash_prompt): Get upstream using old version of `git` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=8c72229bb26bef89357f55320fb1d7b06a7b4aa8;p=dotfiles.git Fix(bash_prompt): Get upstream using old version of `git` --- diff --git a/admin/prog/bash_prompt b/admin/prog/bash_prompt index 4e428f3..aedf458 100644 --- a/admin/prog/bash_prompt +++ b/admin/prog/bash_prompt @@ -70,9 +70,9 @@ prompt_git() { printf "(unknown)")" up=`git rev-parse --abbrev-ref @{u} 2>/dev/null` - if [ -n "$up" ]; then + if [ -n "$up" -a "$up" != "@{u}" ]; then local left right - set -- `git rev-list --count --left-right @{u}...@` + set -- `git rev-list --count --left-right @{u}...HEAD` left=$1 right=$2 if [ "$left" -gt 0 -o "$right" -gt 0 ]; then