threads / discuss / 61258

patch, 9 partsSubject: [PATCH 3/9] refs/reftable: skip duplicate name checks

Subject: Subject: [PATCH 3/9] refs/reftable: skip duplicate name checks

## tl;dr

3 messages between Apr 3, 2024 and Apr 3, 2024. Diffs are folded; open one to read it.

replies: 2people: 3as markdown or json

Han-Wen Nienhuys· Apr 3, 2024, 09:47 UTC · lore

I can't remember why I did not rely on the available routine (did it not exist at the time? or maybe I assumed the files backend relied on the file system to enforce well-formedness). If the functionality is covered by refs_verify_refname_available, it's probably better to rip out of the reftable library (essentially, just delete refname.c and friends) rather than disable it. I am assuming libgit2 will have an equivalent routine as well.

-- 
Han-Wen Nienhuys - hanwenn@gmail.com - http://www.xs4all.nl/~hanwen
Patrick Steinhardt· Apr 3, 2024, 11:21 UTC · re: Han-Wen Nienhuys · lore

Re: Subject: [PATCH 3/9] refs/reftable: skip duplicate name checks

On Wed, Apr 03, 2024 at 11:47:10AM +0200, Han-Wen Nienhuys wrote:
Show 7 quoted lines
> I can't remember why I did not rely on the available routine (did it
> not exist at the time? or maybe I assumed the files backend relied on
> the file system to enforce well-formedness).  If the functionality is
> covered by refs_verify_refname_available, it's probably better to rip
> out of the reftable library (essentially, just delete refname.c and
> friends) rather than disable it. I am assuming libgit2 will have an
> equivalent routine as well.

Yeah, I was on the fence whether I do or don't want to delete the corresponding code. In any case, without Git as a user it's much more likely to start bitrotting even though we do have some unit tests in this area. Whether libgit2 does have a similar generic D/F check I cannot remember though -- it's been a very long time since I have written the reftable backend for libgit2, and the pull request is bitrotting.

My assumption is that as soon as there is going to be a second user of this library we'll have to do some cleanups regardless. So I'm inclined to delete the code now and potentially bring it back if we ever see that it's indeed important for external users.

Patrick
Junio C Hamano· Apr 3, 2024, 16:21 UTC · re: Patrick Steinhardt · lore

Re: Subject: [PATCH 3/9] refs/reftable: skip duplicate name checks

Patrick Steinhardt <ps@pks.im> writes:
> My assumption is that as soon as there is going to be a second user of
> this library we'll have to do some cleanups regardless. So I'm inclined
> to delete the code now and potentially bring it back if we ever see that
> it's indeed important for external users.
The less code we need to carry, the better.
Thanks for the suggestion (and renewed involvement), Han-Wen.

← back to recent threads