summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/git.zsh9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/git.zsh b/lib/git.zsh
index e8ef0d78d..7affdec68 100644
--- a/lib/git.zsh
+++ b/lib/git.zsh
@@ -18,16 +18,13 @@ function parse_git_dirty() {
FLAGS+='--untracked-files=no'
fi
case "$GIT_STATUS_IGNORE_SUBMODULES" in
- "")
- # if unset: ignore dirty submodules
- FLAGS+="--ignore-submodules=dirty"
- ;;
- "git")
+ git)
# let git decide (this respects per-repo config in .gitmodules)
;;
*)
+ # if unset: ignore dirty submodules
# other values are passed to --ignore-submodules
- FLAGS+="--ignore-submodules=$GIT_STATUS_IGNORE_SUBMODULES"
+ FLAGS+="--ignore-submodules=${GIT_STATUS_IGNORE_SUBMODULES:-dirty}"
;;
esac
STATUS=$(command git status ${FLAGS} 2> /dev/null | tail -n1)