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

Re: [PATCH v4 4/4] completion: simplify __gitcomp*

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Feb 5, 2012, 21:14 UTC
Message-ID
<CAMP44s3ECM2e08wsjMzu9Y4xDRw+KVNbMdCeAmxiPn3jNtC59Q@mail.gmail.com>
In-Reply-To
<7vmx8xggan.fsf@alter.siamese.dyndns.org>
2012/2/5 Junio C Hamano <gitster@pobox.com>:
Show 12 quoted lines
> SZEDER Gábor <szeder@ira.uka.de> writes:
>
>> And it does make a difference, it breaks the completion of a single
>> word in multiple steps, e.g. git log --pretty=<TAB> master..<TAB>.  In
>> such cases we pass "${cur##--pretty=}" and "${cur_#*..}" as third
>> argument to __gitcomp() and __gitcomp_nl(), which can be empty strings
>> when the user hits TAB right after the '=' and '..'.
>
> After saying "this rewrite is wrong", I was actually wondering if I should
> have said "this rewrite is not faithful to the original".  Based on your
> analysis, the difference does break the callers, so the rewrite is indeed
> wrong.

That's why we need tests for the completion stuff as well. I was thinking on doing that, but if I have to write a peer-reviewed essay with an introduction for the people that are not familiar with the code in each of the patches, I'd rather not.

-- 
Felipe Contreras
Previous: Junio C HamanoNext: SZEDER Gábor
Message 9 of 11 in “completion: couple of cleanups”
  1. 0/4 completion: couple of cleanupsFelipe Contreras, Feb 2, 2012
  2. Junio C HamanoFeb 3, 2012
  3. Felipe ContrerasFeb 6, 2012
  4. Junio C HamanoFeb 6, 2012
  5. Felipe ContrerasFeb 6, 2012
  6. Junio C HamanoFeb 3, 2012
  7. SZEDER GáborFeb 4, 2012
  8. Junio C HamanoFeb 5, 2012
  9. Felipe ContrerasFeb 5, 2012
  10. SZEDER GáborFeb 6, 2012
  11. Felipe ContrerasFeb 6, 2012

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.