Skip to content

Commit 76c36c0

Browse files
committed
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 <[email protected]>
1 parent 9b3aaf8 commit 76c36c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/completion/git-prompt.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ __git_ps1 ()
335335
local flags_color="$c_lblue"
336336
local branchstring="$c${b##refs/heads/}"
337337

338-
if [ $detached = yes ]; then
338+
if [ $detached = no ]; then
339339
branch_color="$ok_color"
340340
else
341341
branch_color="$bad_color"

0 commit comments

Comments
 (0)