completions/git: Also don't use files for porcelain=2

This was an oversight from the previous commit. Not that it matters
much, because we already removed $files.

Still, this would fail if someone defined a global $files, so let's fix it.

[ci skip]
This commit is contained in:
Fabian Homborg 2019-01-13 21:31:49 +01:00
parent 787f453ec2
commit 6d11e46428

View file

@ -157,7 +157,7 @@ function __fish_git_files
set -l ver (command git --version | string replace -rf 'git version (\d+)\.(\d+)\.?.*' '$1\n$2')
# Version >= 2.11.* has the v2 format.
if test "$ver[1]" -gt 2 2>/dev/null; or test "$ver[1]" -eq 2 -a "$ver[2]" -ge 11 2>/dev/null
command git $git_opt status --porcelain=2 $status_opt -- $files \
command git $git_opt status --porcelain=2 $status_opt \
| while read -la -d ' ' line
set -l file
set -l desc