diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2019-02-07 02:06:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-07 02:06:22 +0300 |
commit | f7d0293d8b9596705abb945e90bc6a1d7211b18d (patch) | |
tree | 7577e7cf46f85c6f5b4e239a9b629d59cfc0564f | |
parent | 0b2990b88578bf758147180161c7909f267a930a (diff) | |
parent | d1fbc1b889f63f6ea3e9672b7069133493ccab8a (diff) |
Merge pull request #1157 from 88maomao/fix-git-operation-not-permitted
Hide stderr from git ls-files
-rwxr-xr-x | functions/vcs.zsh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/functions/vcs.zsh b/functions/vcs.zsh index cb53dd3e..04a07e5d 100755 --- a/functions/vcs.zsh +++ b/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 |