1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-11 00:00:06 +00:00

Merge pull request #1157 from 88maomao/fix-git-operation-not-permitted

Hide stderr from git ls-files
This commit is contained in:
Dominik Ritter 2019-02-07 00:06:22 +01:00 committed by GitHub
commit f7d0293d8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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