git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] completion: do not cache if --git-completion-helper fails

From
Duy Nguyen <pclouds@gmail.com>
Date
Jun 16, 2019, 01:32 UTC
Message-ID
<CACsJy8AkKEf=EvFTcw2QvsQOfaHawWLas-K0FRq-BBLeHuLFbQ@mail.gmail.com>
In-Reply-To
<CAMP44s1RP8ERVX7EPt3oJyd8FP+4OjrGnWnaavnHuORoc+BGxw@mail.gmail.com>

On Fri, Jun 14, 2019 at 1:07 PM Felipe Contreras <felipe.contreras@gmail.com> wrote:

Show 20 quoted lines
>
> On Thu, Jun 13, 2019 at 9:53 PM Duy Nguyen <pclouds@gmail.com> wrote:
> >
> > On Fri, Jun 14, 2019 at 7:30 AM Felipe Contreras
> > <felipe.contreras@gmail.com> wrote:
>
> > > One way or the other, shouldn't my tests be merged? The issue is still
> > > there, and it's nice to have tests for that.
> >
> > Is there any good reason to complete options when they are not going
> > to work anyway (e.g. like checkout which needs $GIT_DIR)? Besides "it
> > used to work before --git-completion-helper" which I don't consider a
> > good reason given the maintenance tradeoff of --git-completion-helper.
>
> No, there is no good reason that I can think of, except checking the
> arguments, which is precisely how I found out the issue; not something
> I usually do. But a newcomer might not know what commands don't work
> outside a git directory.
>
> But more importantly; is there a good enough reason not to?
For me, yes. No extra work for me.
> I seem to
> recall to be annoyed by the fact that 'git command -h' failed on some
> command with a fatal error. Similarly, I don't see any good reason why
> 'git help clone' should ever fail.

You could give the '-h' hack a try. It probably works for some, but I don't think it also works for things like 'git worktree add --git-completion-helper'.

-- 
Duy
Previous: Felipe ContrerasNext: Junio C Hamano
Message 9 of 12 in “test: completion: tests for __gitcomp regression”
  1. test: completion: tests for __gitcomp regressionFelipe Contreras, Jun 7, 2019
  2. completion: do not cache if --git-completion-helper failsNguyễn Thái Ngọc Duy, Jun 7, 2019
  3. SZEDER GáborJun 7, 2019
  4. Felipe ContrerasJun 7, 2019
  5. Duy NguyenJun 12, 2019
  6. Felipe ContrerasJun 14, 2019
  7. Duy NguyenJun 14, 2019
  8. Felipe ContrerasJun 14, 2019
  9. Duy NguyenJun 16, 2019
  10. Junio C HamanoJun 7, 2019
  11. completion: do not cache if --git-completion-helper failsNguyễn Thái Ngọc Duy, Jun 12, 2019
  12. Junio C HamanoJun 12, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.