summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Hesse <list@eworm.de>2018-01-31 08:53:22 +0100
committerOliver Kiddle <opk@zsh.org>2018-02-08 00:49:46 +0100
commitdd8e55c46be98714fa16d2a56a46d5d28cbf13f5 (patch)
tree2901daea3a2f6caa5c36d62e5ed13d040c222d0b
parent0236d9c5f1513091cf66cf6fec33ad6fb2d88960 (diff)
downloadzsh-dd8e55c46be98714fa16d2a56a46d5d28cbf13f5.tar.gz
zsh-dd8e55c46be98714fa16d2a56a46d5d28cbf13f5.zip
42333: git 2.16.0 no longer accepts an empty string as a pathspec element so replace empty strings with a dot
-rw-r--r--ChangeLog4
-rw-r--r--Completion/Unix/Command/_git2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c92a60ecd..01f0733cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 80504c003..002709a5f 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -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