summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobby Russell <robby@planetargon.com>2013-04-22 19:08:55 -0700
committerRobby Russell <robby@planetargon.com>2013-04-22 19:08:55 -0700
commit93ee93938337db6bc220eaa00595b40ad88c2a81 (patch)
tree7f2177c9b7aea3a7d1e170dc5bcfedc46a404ffb /lib
parent5f32c8e1556685715555b362871515a43b13b2dc (diff)
parente41714d72c6c5629efe632b1052b590f5f8905c5 (diff)
downloadzsh-93ee93938337db6bc220eaa00595b40ad88c2a81.tar.gz
zsh-93ee93938337db6bc220eaa00595b40ad88c2a81.tar.bz2
zsh-93ee93938337db6bc220eaa00595b40ad88c2a81.zip
Merge pull request #1745 from jtheoof/master
Added option to allow untracked files as non dirty
Diffstat (limited to 'lib')
-rw-r--r--lib/git.zsh6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/git.zsh b/lib/git.zsh
index 76fe9b142..5f8453112 100644
--- a/lib/git.zsh
+++ b/lib/git.zsh
@@ -15,7 +15,11 @@ parse_git_dirty() {
if [[ $POST_1_7_2_GIT -gt 0 ]]; then
SUBMODULE_SYNTAX="--ignore-submodules=dirty"
fi
- GIT_STATUS=$(git status -s ${SUBMODULE_SYNTAX} 2> /dev/null | tail -n1)
+ if [[ "$DISABLE_UNTRACKED_FILES_DIRTY" != "true" ]]; then
+ GIT_STATUS=$(git status -s ${SUBMODULE_SYNTAX} 2> /dev/null | tail -n1)
+ else
+ GIT_STATUS=$(git status -s ${SUBMODULE_SYNTAX} -uno 2> /dev/null | tail -n1)
+ fi
if [[ -n $GIT_STATUS && "$GIT_STATUS" != "$CLEAN_MESSAGE" ]]; then
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
else