zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: dana <dana@dana.is>
Cc: zsh-workers@zsh.org, Adrian Vollmer <zsh@vollmer.syss.de>
Subject: Re: Bug in git tab completion: If git.showSignature = true is set globally, tab completion of commits is garbled
Date: Sun, 10 Mar 2019 16:20:51 +0000	[thread overview]
Message-ID: <20190310162051.j57oshqanmondcug@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <CD16F753-D0B8-44D6-B6FB-AEA50FA32307@dana.is>

dana wrote on Sat, Mar 09, 2019 at 17:37:47 -0600:
> On 9 Mar 2019, at 10:43, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> >Huh.  Odd, but I think we can live with that: we can just have _git
> >discard the hardcoded header line that git emits.  All we really care
> >about is that future git versions will continue to emit that line.  I
> >assume they will, for compatibility reasons.
> 
> In that case, i think it would be something like this? I didn't test very
> extensively (not even sure which paths exactly lead to these commands), but it
> does seem to work for the scenario at hand

Looks good.  Thanks.  More below regarding the codepaths to these.

> +++ b/Completion/Unix/Command/_git
> @@ -5652,7 +5652,7 @@ __git_describe_branch () {

Looking at the callers of this, it should be used by «git checkout <TAB>» (one
of the alternatives is "basenames" of remote branches), refspecs in «git push
$remote …», etc; but an easier way to test this would be to run
.
    compdef __git_describe_commit f
    f <TAB>
.
interactively.

> @@ -6493,8 +6493,9 @@ __git_commit_objects () {

This function completes hashes of commits, as output by `git log --pretty=%h`.
It's used by _git-send-email.  (I'm surprised that it isn't used by
_git-format-patch; those two commands are very similar.)

> @@ -6517,10 +6518,11 @@ __git_recent_commits () {

This is used by «git commit --fixup=<TAB>».

Cheers,

Daniel

      reply	other threads:[~2019-03-10 16:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-07 19:23 Adrian Vollmer
2019-03-07 23:27 ` dana
2019-03-08 20:22   ` Daniel Shahaf
2019-03-09 16:25     ` dana
2019-03-09 16:43       ` Daniel Shahaf
2019-03-09 23:37         ` dana
2019-03-10 16:20           ` 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=20190310162051.j57oshqanmondcug@tarpaulin.shahaf.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=dana@dana.is \
    --cc=zsh-workers@zsh.org \
    --cc=zsh@vollmer.syss.de \
    /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).