From: Christian Hesse <list@eworm.de>
To: zsh-workers@zsh.org
Cc: Christian Hesse <mail@eworm.de>
Subject: [PATCH 1/1] fix file completion for git
Date: Wed, 31 Jan 2018 08:53:22 +0100 [thread overview]
Message-ID: <20180131075322.14711-1-list@eworm.de> (raw)
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
reply other threads:[~2018-01-31 7:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180131075322.14711-1-list@eworm.de \
--to=list@eworm.de \
--cc=mail@eworm.de \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).