From: Stefan Sperling Subject: Re: change got_object_commit_dup() return type To: Mark Jamsek Cc: Mikhail , Game of Trees Date: Sat, 17 Sep 2022 21:58:14 +0200 On Sun, Sep 18, 2022 at 02:49:45AM +1000, Mark Jamsek wrote: > I don't think we need a function to decrement the reference counter as > got_object_commit_close() already does this. Right. > The below diff adds got_object_commit_retain(), which increments refcnt. > But I'm partial to Mikhail's "addref" name too; I thought it might be > a little too close to a repository "reference" that it could be > confusing for some but it might be better for those not familiar with > the "retain" naming convention. Seems fine to me. Other verbs I can think of which are commonly used with reference counters ("get", "take", "increment") all require mention of "reference" which is indeed ambiguous in our code base. I like your "retain" idea, which avoids this. ok stsp@