From: Jeff King Date: Mon, 21 May 2018 02:39:14 GMT Subject: Re: Re*: [PATCH v4 3/4] string-list: provide `string_list_appendf()` Message-ID: <20180521023913.GB16236@sigill.intra.peff.net> In-Reply-To: On Mon, May 21, 2018 at 09:25:01AM +0900, Junio C Hamano wrote: > Junio C Hamano writes: > > > I have a feeling that argv_array might be a better fit for the > > purpose of keeping track of to_free[] strings in the context of this > > series. Moving away from string_list would allow us to sidestep the > > storage ownership issues the API has, and we do not need the .util > > thing string_list gives us (which is one distinct advantage string_list > > has over argv_array, if the application needs that feature). > > > > We would need to make _pushf() and friends return "const char *" if > > we go that route to make the resulting API more useful, though. > > ... and redoing the 4/4 patch using argv_array_pushf() makes the > result look like this, which does not look too bad. Agreed. -Peff