From: Junio C Hamano Date: Wed, 17 Oct 2012 07:44:25 +0000 (-0700) Subject: coloured git-prompt: paint detached HEAD marker in red X-Git-Tag: v1.8.1-rc0~39^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76c36c02ff3fe1571051ce9278248bd269f8341b;p=thirdparty%2Fgit.git coloured git-prompt: paint detached HEAD marker in red 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 --- diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh index 9f0b6bbc12..00fc099b8d 100644 --- a/contrib/completion/git-prompt.sh +++ b/contrib/completion/git-prompt.sh @@ -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"