Permalink
Browse files

Adding a fix for the DISABLE_UNTRACKED_FILES_DIRTY option.

  • Loading branch information...
1 parent 27c6bec commit 4ff861ee115fdba24033f945dcf3cacea3120074 @croach croach committed May 19, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/git.zsh
View
8 lib/git.zsh
@@ -15,12 +15,12 @@ parse_git_dirty() {
if [[ $POST_1_7_2_GIT -gt 0 ]]; then
SUBMODULE_SYNTAX="--ignore-submodules=dirty"
fi
- if [[ "$DISABLE_UNTRACKED_FILES_DIRTY" != "true" ]]; then
- GIT_STATUS=$(git status -s ${SUBMODULE_SYNTAX} 2> /dev/null | tail -n1)
- else
+ if [[ "$DISABLE_UNTRACKED_FILES_DIRTY" == "true" ]]; then
GIT_STATUS=$(git status -s ${SUBMODULE_SYNTAX} -uno 2> /dev/null | tail -n1)
+ else
+ GIT_STATUS=$(git status -s ${SUBMODULE_SYNTAX} 2> /dev/null | tail -n1)
fi
- if [[ -n $(git status -s ${SUBMODULE_SYNTAX} -uno 2> /dev/null) ]]; then
+ if [[ -n $GIT_STATUS ]]; then
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
else
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"

0 comments on commit 4ff861e

Please sign in to comment.