mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-11 00:00:06 +00:00
Hide errors from git ls-files
This commit is contained in:
parent
0b2990b885
commit
d1fbc1b889
1 changed files with 2 additions and 2 deletions
|
@ -15,10 +15,10 @@ function +vi-git-untracked() {
|
||||||
# dump out if we're outside a git repository (which includes being in the .git folder)
|
# dump out if we're outside a git repository (which includes being in the .git folder)
|
||||||
[[ $? != 0 || -z $repoTopLevel ]] && return
|
[[ $? != 0 || -z $repoTopLevel ]] && return
|
||||||
|
|
||||||
local untrackedFiles=$(command git ls-files --others --exclude-standard "${repoTopLevel}")
|
local untrackedFiles=$(command git ls-files --others --exclude-standard "${repoTopLevel}" 2> /dev/null)
|
||||||
|
|
||||||
if [[ -z $untrackedFiles && "$POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY" == "true" ]]; then
|
if [[ -z $untrackedFiles && "$POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY" == "true" ]]; then
|
||||||
untrackedFiles+=$(command git submodule foreach --quiet --recursive 'command git ls-files --others --exclude-standard')
|
untrackedFiles+=$(command git submodule foreach --quiet --recursive 'command git ls-files --others --exclude-standard' 2> /dev/null)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ -z $untrackedFiles ]] && return
|
[[ -z $untrackedFiles ]] && return
|
||||||
|
|
Loading…
Reference in a new issue