1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-09-21 15:30:09 +00:00

Merge branch 'jokester/override--ignore-submodules' (#2214)

Closes #2214
This commit is contained in:
Marc Cornellà 2019-11-06 19:42:08 +01:00
commit 4a9cd68ea6

View file

@ -17,6 +17,16 @@ function parse_git_dirty() {
if [[ "$DISABLE_UNTRACKED_FILES_DIRTY" == "true" ]]; then
FLAGS+='--untracked-files=no'
fi
case "$GIT_STATUS_IGNORE_SUBMODULES" in
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:-dirty}"
;;
esac
STATUS=$(command git status ${FLAGS} 2> /dev/null | tail -n1)
fi
if [[ -n $STATUS ]]; then