Permalink
Browse files

Hide errors from git ls-files

  • Loading branch information...
88maomao committed Feb 6, 2019
1 parent 0b2990b commit d1fbc1b889f63f6ea3e9672b7069133493ccab8a
Showing with 2 additions and 2 deletions.
  1. +2 −2 functions/vcs.zsh
@@ -15,10 +15,10 @@ function +vi-git-untracked() {
# dump out if we're outside a git repository (which includes being in the .git folder)
[[ $? != 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
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

[[ -z $untrackedFiles ]] && return

0 comments on commit d1fbc1b

Please sign in to comment.