]> git.phdru.name Git - dotfiles.git/blobdiff - admin/prog/bash_prompt
Fix(bash_prompt): Get upstream using old version of `git`
[dotfiles.git] / admin / prog / bash_prompt
index 4e428f398450283bf5d72833cab7e453e776e420..aedf458e7b192eb600b5774c0d843fefb1e1cc9b 100644 (file)
@@ -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