Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
27fff272
Commit
27fff272
authored
Sep 08, 2016
by
Yuichi Tanikawa
Committed by
Marc Cornellà
Sep 08, 2016
Browse files
Fix git_prompt_status() not showing ahead/behind/diverged status correctly (#5388)
parent
71201ffd
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/git.zsh
View file @
27fff272
...
...
@@ -165,13 +165,13 @@ function git_prompt_status() {
if
$(
echo
"
$INDEX
"
|
grep
'^UU '
&> /dev/null
)
;
then
STATUS
=
"
$ZSH_THEME_GIT_PROMPT_UNMERGED$STATUS
"
fi
if
$(
echo
"
$INDEX
"
|
grep
'^## .*ahead'
&> /dev/null
)
;
then
if
$(
echo
"
$INDEX
"
|
grep
'^##
[^ ]\+
.*ahead'
&> /dev/null
)
;
then
STATUS
=
"
$ZSH_THEME_GIT_PROMPT_AHEAD$STATUS
"
fi
if
$(
echo
"
$INDEX
"
|
grep
'^## .*behind'
&> /dev/null
)
;
then
if
$(
echo
"
$INDEX
"
|
grep
'^##
[^ ]\+
.*behind'
&> /dev/null
)
;
then
STATUS
=
"
$ZSH_THEME_GIT_PROMPT_BEHIND$STATUS
"
fi
if
$(
echo
"
$INDEX
"
|
grep
'^## .*diverged'
&> /dev/null
)
;
then
if
$(
echo
"
$INDEX
"
|
grep
'^##
[^ ]\+
.*diverged'
&> /dev/null
)
;
then
STATUS
=
"
$ZSH_THEME_GIT_PROMPT_DIVERGED$STATUS
"
fi
echo
$STATUS
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment