git.99rst.org
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
9b3aaf8
)
coloured git-prompt: paint detached HEAD marker in red
author
Junio C Hamano
<redacted>
Wed, 17 Oct 2012 07:44:25 +0000
(
00:44
-0700)
committer
Junio C Hamano
<redacted>
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 <redacted>
contrib/completion/git-prompt.sh
patch
|
blob
|
history
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"
git clone https://git.99rst.org/PROJECT