Re: [PATCH 7/9] config: do not use strbuf_split()

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

 



On Thu, Jul 31, 2025 at 3:42 AM Junio C Hamano <gitster@xxxxxxxxx> wrote:
> When parsing an old-style GIT_CONFIG_PARAMETERS environment
> variable, the code parses the key=value pair by spliting them at '='
> into an array of strbuf's.  As strbuf_split() leafes the delimiter
> at the end of the split piece, the code has to manually trim it.

s/spliting/splitting/
s/leafes/leaves/

> If we split with string_list_split(), that becomes unnecessary.
> Retire the use of strbuf_split().
>
> Note that the max parameter of string_list_split() is of
> an ergonomically iffy design---it specifies the maximum number of
> times the function is allowed to split, which means that in order to
> split a text into up to 2 pieces, you have to pass 1, not 2.
>
> Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx>





[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