Re: [PATCH v3 2/7] string-list: align string_list_split() with its _in_place() counterpart

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

 



On Fri, Aug 01, 2025 at 03:04:18PM -0700, Junio C Hamano wrote:

> For some unknown reason, unlike string_list_split_in_place(),
> string_list_split() took only a single character as a field
> delimiter.  Before giving both functions more features in future
> commits, allow string_list_split() to take more than one delimiter
> characters to make them closer to each other.

You must know by now that writing "some unknown reason" in a commit
message is the best way to nerd-snipe me. ;)

It looks like 52acddf36c (string-list: multi-delimiter
`string_list_split_in_place()`, 2023-04-24) modified the in-place
variant, but left the original alone. It was needed for the in-place one
to replace strtok(). Probably the original _should_ have been updated
then too for consistency, but wasn't. The motivation isn't given there,
but I'd assume it was some combination of "didn't think of it",
laziness, and not wanting to update all of the callers.

I don't think there's a need to re-roll for this. Mostly I was curious
and thought I'd share my finding on the list.

-Peff




[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