zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH 1/1] fix file completion for git
@ 2018-01-31  7:53 Christian Hesse
  0 siblings, 0 replies; only message in thread
From: Christian Hesse @ 2018-01-31  7:53 UTC (permalink / raw)
  To: zsh-workers; +Cc: Christian Hesse

From: Christian Hesse <mail@eworm.de>

Starting with version 2.16.0 git does no longer accept empty string as a
pathspec element. Thus we have to replace empty strings with a dot.

Thanks to 'okdana' for help on irc.

https://github.com/git/git/commit/9e4e8a64c2b9043b7ae2b6476efd9214c6738505
Signed-off-by: Christian Hesse <mail@eworm.de>
---
 Completion/Unix/Command/_git | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-31  7:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-31  7:53 [PATCH 1/1] fix file completion for git Christian Hesse

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).