From 8c72229bb26bef89357f55320fb1d7b06a7b4aa8 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 15 Dec 2020 00:14:35 +0300 Subject: [PATCH] Fix(bash_prompt): Get upstream using old version of `git` --- admin/prog/bash_prompt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.5