mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-12 20:21:02 +01:00
Clean up ignore submodules logic in parse_git_dirty
This commit is contained in:
parent
7cc3a32bff
commit
b7e37cea90
1 changed files with 3 additions and 6 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue