]> git.ipfire.org Git - thirdparty/git.git/commitdiff
coloured git-prompt: paint detached HEAD marker in red
authorJunio C Hamano <gitster@pobox.com>
Wed, 17 Oct 2012 07:44:25 +0000 (00:44 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 17 Oct 2012 07:44:25 +0000 (00:44 -0700)
Paint the marker for normal state in green and detached state
in red, instead of the other way around.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-prompt.sh

index 9f0b6bbc123d1bb6ec4a0c5158bca7eed5984f4d..00fc099b8d0f9f048cd9336f079929a336d79de2 100644 (file)
@@ -335,7 +335,7 @@ __git_ps1 ()
                                local flags_color="$c_lblue"
                                local branchstring="$c${b##refs/heads/}"
 
-                               if [ $detached = yes ]; then
+                               if [ $detached = no ]; then
                                        branch_color="$ok_color"
                                else
                                        branch_color="$bad_color"