Skip to content

Commit

Permalink
coloured git-prompt: paint detached HEAD marker in red
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Oct 17, 2012
1 parent 9b3aaf8 commit 76c36c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/completion/git-prompt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 76c36c0

Please sign in to comment.