Merge branch 'tr/test-lint-no-export-assignment-in-shell' into maint
[gitweb.git] / contrib / completion / git-prompt.sh
index b6b1534c0287dadb7d3e47051fd892debf69e6b3..54e48299ae795b7a3a50cf09f850faa16b87e692 100644 (file)
@@ -280,6 +280,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"
@@ -296,6 +297,7 @@ __git_ps1 ()
                                r="|BISECTING"
                        fi
 
+                       test -n "$b" ||
                        b="$(git symbolic-ref HEAD 2>/dev/null)" || {
                                detached=yes
                                b="$(