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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Beat and Junio,

Le 2024-02-16 à 12:35, Junio C Hamano a écrit :
> Beat Bolli <dev+git@xxxxxxxxx> 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.  

Yes, thanks for improving that!

> 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.
> 
>> The "-E" grep option (extended syntax) was not necessary, as $section is
>> a single word.
>>
>> While at it, wrap the over-long lines to make them more readable.
>>
>> Signed-off-by: Beat Bolli <dev+git@xxxxxxxxx>
>> ---
>>
>> Junio, this goes on top of 'pb/complete-config' which is on next
>> currently.
> 
> Alternatively we could redo the topic, squashing this fix in, after
> the release when we rewind 'next'.
> 
> Thanks.

Actually you already merged this topic to master in 89400c3615, so it would 
go on top, no ? 

Thanks,
Philippe.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux