Download raw body.
change got_object_commit_dup() return type
On Mon, Sep 12, 2022 at 09:36:53AM +0200, Stefan Sperling wrote: > On Mon, Sep 12, 2022 at 03:43:40PM +1000, Mark Jamsek wrote: > > This can be void. We could arguably drop the function and do this > > inline, but using the function is more consistent with Got style imo. > > > > ok? > > Yes, your patch improves the code as it is. > > However, the general idea of this _dup() function does not seem good. > Callers might assume they can free the original pointer after _dup(), > because, by convention, _dup() implies a new allocation. > I don't think it is wise to deviate from this convention. > > Instead of having such a weird _dup() function, we could simply increment > the reference counter directly where needed. Or maybe add new functions like got_commit_addref/delref.
change got_object_commit_dup() return type