Merge branch 'bp/mediawiki-credential'
[gitweb.git] / contrib / completion / git-prompt.sh
index 9f4e6a368cf590ccfc9e469ad8820e2af93c3568..86a4f3fa49cf68e14a6b0de13cb7f63fe8a2624d 100644 (file)
@@ -360,6 +360,7 @@ __git_ps1 ()
                                step=$(cat "$g/rebase-apply/next")
                                total=$(cat "$g/rebase-apply/last")
                                if [ -f "$g/rebase-apply/rebasing" ]; then
+                                       b="$(cat "$g/rebase-apply/head-name")"
                                        r="|REBASE"
                                elif [ -f "$g/rebase-apply/applying" ]; then
                                        r="|AM"
@@ -376,6 +377,7 @@ __git_ps1 ()
                                r="|BISECTING"
                        fi
 
+                       test -n "$b" ||
                        b="$(git symbolic-ref HEAD 2>/dev/null)" || {
                                detached=yes
                                b="$(