1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-21 21:30:09 +00:00

Fixed dirty check to include files added to index

This commit is contained in:
Yoav Weiss 2013-02-13 11:28:13 +01:00
parent 171a76a3c4
commit 11576dd40b

View file

@ -13,7 +13,7 @@ parse_git_dirty() {
if [[ $POST_1_7_2_GIT -gt 0 ]]; then if [[ $POST_1_7_2_GIT -gt 0 ]]; then
SUBMODULE_SYNTAX="--ignore-submodules=dirty" SUBMODULE_SYNTAX="--ignore-submodules=dirty"
fi fi
if [[ -n $(git diff ${SUBMODULE_SYNTAX} 2> /dev/null) ]]; then if [[ -n $(git diff ${SUBMODULE_SYNTAX} HEAD 2> /dev/null) ]]; then
echo "$ZSH_THEME_GIT_PROMPT_DIRTY" echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
else else
echo "$ZSH_THEME_GIT_PROMPT_CLEAN" echo "$ZSH_THEME_GIT_PROMPT_CLEAN"