Subject: Re: [PATCH 0/5] refs: remove functions without ref store

From: Patrick Steinhardt <[email-masked]>
Date: Fri, 10 May 2024 07:54:02 +0200

On Thu, May 09, 2024 at 12:55:57PM -0400, Jeff King wrote:
> On Mon, May 06, 2024 at 08:44:45AM +0200, Patrick Steinhardt wrote:
> 
> > On Fri, May 03, 2024 at 11:24:11AM -0700, Junio C Hamano wrote:
> > > Jeff King <[email-masked]> writes:
> > > 
> > > > Though maybe an even more radical proposal: now that read_ref_full(),
> > > > etc, are gone, and we have only refs_read_ref_full(), could/should we
> > > > shorten the latter to drop the "refs_" prefix?
> > > 
> > > I view it as a good longer-term goal.  But I also view it as an
> > > orthogonal issue to the transition.
> > 
> > Personally, I'd prefer to keep the `refs_` prefix. This may be personal
> > preference, but I find it way easier to reason about code when there are
> > prefixes for our functions that clearly indicate the subsystem they
> > belong to.
> > 
> > It's also in line with how other subsystems behave. Everything relating
> > to strbufs has a `strbuf_` prefix, attr-related code has `attr_` or
> > `git_attr_`, mem-pool has `mem_pool_`. So ref-related code having a
> > `ref_` prefix just feels natural to me.
> 
> I'd find that more compelling if all of the ref-related code had such a
> prefix. But try reading refs.h sometime. ;)
> 
> That said, if we want to move in that direction I am OK with it.

Oh yeah, it's still quite a mixed bag. I will follow up this patch
series to get rid of `the_repository` in "refs.c" completely. While at
it I'll adapt some of the functions to gain the `refs_` prefix.

Patrick