1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-23 16:40:24 +02:00

42333: git 2.16.0 no longer accepts an empty string as a pathspec element so replace empty strings with a dot

This commit is contained in:
Christian Hesse 2018-01-31 08:53:22 +01:00 committed by Oliver Kiddle
parent 0236d9c5f1
commit dd8e55c46b
2 changed files with 5 additions and 1 deletions

View file

@ -6759,7 +6759,7 @@ __git_files () {
local pref=$gitcdup$gitprefix$PREFIX
# First allow ls-files to pattern-match in case of remote repository
files=(${(0)"$(_call_program files git ls-files -z --exclude-standard ${(q)opts} -- ${(q)${pref:+$pref\\\*}} 2>/dev/null)"})
files=(${(0)"$(_call_program files git ls-files -z --exclude-standard ${(q)opts} -- ${(q)${pref:+$pref\\\*}:-.} 2>/dev/null)"})
__git_command_successful $pipestatus || return
# If ls-files succeeded but returned nothing, try again with no pattern