Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
coloured git-prompt: paint detached HEAD marker in red
author
Junio C Hamano
<gitster@pobox.com>
Wed, 17 Oct 2012 07:44:25 +0000
(
00:44
-0700)
committer
Junio 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
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
9b3aaf8
)
diff --git
a/contrib/completion/git-prompt.sh
b/contrib/completion/git-prompt.sh
index 9f0b6bbc123d1bb6ec4a0c5158bca7eed5984f4d..00fc099b8d0f9f048cd9336f079929a336d79de2 100644
(file)
--- 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"