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

Re: [PATCH] completion: use awk for filtering the config entries

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 18, 2024, 21:58 UTC
Message-ID
<aa3e36a1-52d3-0c15-b70b-83c6664757f5@gmx.de>
In-Reply-To
<4a1d3618-cebe-4c20-89ce-c5dab51af21a@drbeat.li>
Hi Beat,
On Fri, 16 Feb 2024, Beat Bolli wrote:
Show 19 quoted lines
> On 16.02.24 18:35, Junio C Hamano wrote:
> > Beat Bolli <dev+git@drbeat.li> writes:
> >
> > > Commits 1e0ee4087e (completion: add and use
> > > __git_compute_first_level_config_vars_for_section, 2024-02-10) and
> > > 6e32f718ff (completion: add and use
> > > __git_compute_second_level_config_vars_for_section, 2024-02-10)
> > > introduced new helpers for config completion.
> > >
> > > Both helpers use a pipeline of grep and awk to filter the list of config
> > > entries. awk is perfectly capable of filtering, so let's eliminate the
> > > grep process and move the filtering into the awk script.
> >
> > Makes sense.  I wonder if we can have some simple script sanity
> > checker that catches things like this, e.g., catting a single file
> > into pipe, grep appearing upstream of awk or sed, etc.
>
> Yes, there are quite a few cases of these in t/. I'm not sure if it's worth
> the churn, though. At least it would make the tests faster on Windows...
Thank you for caring about the speed on Windows!

Ciao, Johannes

Previous: Beat BolliNext: Junio C Hamano
Message 4 of 7 in “completion: use awk for filtering the config entries”
  1. completion: use awk for filtering the config entriesBeat Bolli, Feb 16, 2024
  2. Junio C HamanoFeb 16, 2024
  3. Beat BolliFeb 16, 2024
  4. Johannes SchindelinFeb 18, 2024
  5. Junio C HamanoFeb 19, 2024
  6. Philippe BlainFeb 16, 2024
  7. Junio C HamanoFeb 16, 2024

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.