Re: [PATCH v2 02/11] clean: do not pass strbuf by value

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

 



On Sat, Aug 02, 2025 at 09:44:47AM -0700, Junio C Hamano wrote:

> > I dunno. Maybe it is nitpicking, but I think "don't take a strbuf if you
> > only need a string" is a good general rule. Of course there is only one
> > caller here, so flexibility is probably not that important.
> 
> But I think we engrave both lessons in the history by keeping this
> step as-is, do the string_list_split_in_place_f() thing, and then
> add a new patch to pass just the .buf member to parse_choice().

I would certainly be happy with that.

The other strbuf-by-value in write_worktree_linking_files() could also
just turn into a "const char *".

-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