mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-19 02:41:57 +00:00
Merge branch 'jokester/override--ignore-submodules' (#2214)
Closes #2214
This commit is contained in:
commit
4a9cd68ea6
1 changed files with 10 additions and 0 deletions
10
lib/git.zsh
10
lib/git.zsh
|
@ -17,6 +17,16 @@ function parse_git_dirty() {
|
||||||
if [[ "$DISABLE_UNTRACKED_FILES_DIRTY" == "true" ]]; then
|
if [[ "$DISABLE_UNTRACKED_FILES_DIRTY" == "true" ]]; then
|
||||||
FLAGS+='--untracked-files=no'
|
FLAGS+='--untracked-files=no'
|
||||||
fi
|
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)
|
STATUS=$(command git status ${FLAGS} 2> /dev/null | tail -n1)
|
||||||
fi
|
fi
|
||||||
if [[ -n $STATUS ]]; then
|
if [[ -n $STATUS ]]; then
|
||||||
|
|
Loading…
Reference in a new issue