zsh-users
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: git-completion 1.2 released
Date: Mon, 23 Nov 2020 12:31:10 -0600	[thread overview]
Message-ID: <CAMP44s0+567Kr0i4MkFbv38b9GFbaBJUfNJBzu9Tbc=nxsbuJg@mail.gmail.com> (raw)
In-Reply-To: <20201123154446.GA15080@tarpaulin.shahaf.local2>

On Mon, Nov 23, 2020 at 9:44 AM Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
>
> Felipe Contreras wrote on Mon, Nov 23, 2020 at 01:49:16 -0600:

> I suspect that TODO comment should simply be deleted for vagueness,
> especially given its age.

I suspect so too. It seems Nikolai Weibull added that comment for some
reason in 2011 but he hasn't been active for a lot of time and nobody
removed it.

> > And there's a lot of others.
>
> If so, they haven't been reported.  We can't fix bugs unless they are
> reported to us.

Well, I do fix bugs before they are reported, because I use git all
the time, and I use git completion all the time, and I also developed
a testing framework for the completion so users don't have to be
bitten by bugs in order to find them.

> > I did some hacks to run Zsh's official Git completion against Git's
> > testing framework, and at least half of them fail. I could tell you
> > how to do that if you are interested.
>
> Thanks for the offer.  We would be interested, if the results could be used
> without licensing concerns.  zsh's _git is BSD-licensed.

It depends what part of the tests you want to use. Many of the tests
were developed by me, so I own the copyright.

I pushed the branch to my repository:

https://github.com/felipec/git-completion/blob/zsh-system/test/completion-zsh-system.t

32 tests fail, 38 pass.

Just run that script with Bash.

> > So in my view it's clear the priorities of the two completions are
> > very different.
>
> It's nothing as deliberate as that.  It's more likely just that nobody
> ever reported the bug whilst someone able and inclined to fix it
> happened to be listening.

In many cases nobody reported the bugs to the Git mailing list either.
Git developers themselves find the areas of opportunity.

> Also, in the specific case of «git -C», the Git maintainers probably use
> that option far more often than the average zsh user does (to run their
> HEAD builds against test repositories).

Precisely.

But I'm talking more about the speed. This is the thing is very clear
Git developers care about, as they often perform tests on the Bash
completion itself, and optimize it, shaving milliseconds here and
there.

I sent a patch to exemplify how this speed can be leveraged from Zsh's
official completion, for example using __git_complete_revlist, which
is extremely fast, compared to whatever the Zsh completion is doing.
Yes, it probably doesn't autocomplete exactly the same list, but it's
more than good enough.

These are the priorities I'm talking about; mainly the compromise in
completeness in order to get more usability (actually save the user's
time while completing commands).

Cheers.

-- 
Felipe Contreras


      reply	other threads:[~2020-11-23 18:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 16:05 Felipe Contreras
2020-11-21 16:03 ` Daniel Shahaf
2020-11-21 20:14   ` Bart Schaefer
2020-11-22  0:59     ` Felipe Contreras
2020-11-22  0:53   ` Felipe Contreras
2020-11-23  4:33     ` Daniel Shahaf
2020-11-23  7:49       ` Felipe Contreras
2020-11-23 15:44         ` Daniel Shahaf
2020-11-23 18:31           ` Felipe Contreras [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='CAMP44s0+567Kr0i4MkFbv38b9GFbaBJUfNJBzu9Tbc=nxsbuJg@mail.gmail.com' \
    --to=felipe.contreras@gmail.com \
    --cc=d.s@daniel.shahaf.name \
    --cc=zsh-users@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).