Browse Source

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 <gitster@pobox.com>
maint
Junio C Hamano 13 years ago
parent
commit
76c36c02ff
  1. 2
      contrib/completion/git-prompt.sh

2
contrib/completion/git-prompt.sh

@ -335,7 +335,7 @@ __git_ps1 () @@ -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"

Loading…
Cancel
Save