On Tue, Sep 10, 2024 at 1:50 AM Phillip Wood <phillip.wood123@xxxxxxxxx> wrote: > > On 10/09/2024 07:41, Patrick Steinhardt wrote: > > Is there ever a case where one wants to > > allocate the configset, but not use it? > > That was my thought too - I suggested providing git_configset_new() that > would allocate and initialize a config set in my response to the last > round [1]. It is good to see that the struct in now namespaced in the > next patch but separating out allocation and initialization makes the > api harder to use than it needs to be. I'd also like to see > git_configset_clear_and_free() become git_configset_free(). > > Best Wishes > > Phillip > > [1] > https://lore.kernel.org/git/47b18fa4-f01b-4f42-8d04-9e145515ccc1@xxxxxxxxx Agreed, it doesn't make sense to have both alloc() and init() when they can be combined and same with renaming git_configset_clear_and_free() to git_configset_free().