diff --git a/lib/git.zsh b/lib/git.zsh index f7eccb81..060e822b 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -15,7 +15,19 @@ function parse_git_dirty() { FLAGS=('--porcelain') if [[ "$(command git config --get oh-my-zsh.hide-dirty)" != "1" ]]; then if [[ $POST_1_7_2_GIT -gt 0 ]]; then - FLAGS+='--ignore-submodules=dirty' + case "$GIT_STATUS_IGNORE_SUBMODULES" in + "") + # if unset: ignore dirty submodules + FLAGS+="--ignore-submodules=dirty" + ;; + "git") + # let git decide (this respects per-repo config in .gitmodules) + ;; + *) + # other values are passed to --ignore-submodules + FLAGS+="--ignore-submodules=$GIT_STATUS_IGNORE_SUBMODULES" + ;; + esac fi if [[ "$DISABLE_UNTRACKED_FILES_DIRTY" == "true" ]]; then FLAGS+='--untracked-files=no'