summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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