Skip to content

Commit

Permalink
Merge pull request ohmyzsh#1834 from croach/disable_untracked_files_d…
Browse files Browse the repository at this point in the history
…irty_fix

Adding a fix for the DISABLE_UNTRACKED_FILES_DIRTY option.
  • Loading branch information
robbyrussell committed May 23, 2013
2 parents 0078538 + 4ff861e commit 79196f8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/git.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 79196f8

Please sign in to comment.