On Thu, 10 May 2018 10:32:09 -0700 Stefan Beller <sbeller@xxxxxxxxxx> wrote: > > - I would call them release_commit() and release_tag(), to match > > strbuf_release(). > > Why not commit_release and tag_release to also have the same order > of words as in strbuf_release ? At this point in the discussion, either is fine. > > - It might be better to just inline the handling of releasing commit > > and tag memory. This code already knows that, for a tree, it needs to > > free its buffer and only its buffer, so it is not much of a stretch > > to think that it similarly knows the details of commit and tag > > objects too. > > We still call out to free_tree_buffer? Not sure I understand. I meant that since we call out to free_tree_buffer (as you said), this shows that the code knows the internal details of a tree object (in that it has a buffer, and that needs to be freed, and that is the only thing that needs to be freed), so maybe the code should operate on the internal details of commits and tags as well. But again, this is a minor point.