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
Ohmyzsh
Commits
2e213b9b
Commit
2e213b9b
authored
Jan 27, 2013
by
Yoav Weiss
Browse files
Faster dirty git status check (using git diff)
parent
615e41b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/git.zsh
View file @
2e213b9b
...
...
@@ -13,7 +13,7 @@ parse_git_dirty() {
if
[[
$POST_1_7_2_GIT
-gt
0
]]
;
then
SUBMODULE_SYNTAX
=
"--ignore-submodules=dirty"
fi
if
[[
-n
$(
git
status
-s
${
SUBMODULE_SYNTAX
}
2> /dev/null
)
]]
;
then
if
[[
-n
$(
git
diff
--ignore-submodules
HEAD
2> /dev/null
)
]]
;
then
echo
"
$ZSH_THEME_GIT_PROMPT_DIRTY
"
else
echo
"
$ZSH_THEME_GIT_PROMPT_CLEAN
"
...
...
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