From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] _git: Complete files after 'reset' when there are no commits, when the 'verbose' style is set.
Date: Sun, 06 Aug 2017 17:01:10 +0000 [thread overview]
Message-ID: <1502038870.3035333.1064794864.46025A40@webmail.messagingengine.com> (raw)
In-Reply-To: <14081.1501971067@thecus.kiddle.eu>
Oliver Kiddle wrote on Sun, 06 Aug 2017 00:11 +0200:
> On 31 Jul, Daniel Shahaf wrote:
> > +++ b/Completion/Unix/Command/_git
> > @@ -1462,6 +1462,12 @@ _git-reset () {
> > case $state in
> > (file)
> > local tree=HEAD
> > + if zstyle -t :completion:${curcontext}: verbose; then
> > + if ! _call_program headed git rev-parse --verify HEAD 2>/dev/null; then
>
> Was this supposed to assign the output of git rev-parse to $tree
>
No, it was not. I wanted to check whether HEAD refers to a commit, and
for that, only the command's exit value matters.
> because this is currently spewing the hash into the terminal?
The code would be correct either with the assignment you implemented, or
with additionally redirecting stdout to /dev/null.
> Note _call_program should do the stderr redirection for you.
>
*nod*. I didn't test without the 2>/dev/null redirection.
> Patch below does this and adds a few new options for git 2.14.
Thanks for fixing.
Cheers,
Daniel
prev parent reply other threads:[~2017-08-06 17:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-31 0:59 Daniel Shahaf
2017-08-05 22:11 ` Oliver Kiddle
2017-08-06 17:01 ` Daniel Shahaf [this message]
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=1502038870.3035333.1064794864.46025A40@webmail.messagingengine.com \
--to=d.s@daniel.shahaf.name \
--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).