1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-01 21:51:40 +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

@ -1,5 +1,9 @@
2018-02-07 Oliver Kiddle <okiddle@yahoo.co.uk>
* Christian Hesse: 42333: Completion/Unix/Command/_git: Starting
with version 2.16.0 git no longer accepts an empty string as a
pathspec element. Thus we have to replace empty strings with a dot.
* Matthew Martin: 42330: Completion/Unix/Command/_ln:
-L and -P are POSIX, but not supported by Darwin or NetBSD

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