git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Subject: [PATCH 3/9] refs/reftable: skip duplicate name checks
@ 2024-04-03  9:47 Han-Wen Nienhuys
  2024-04-03 11:21 ` Patrick Steinhardt
  0 siblings, 1 reply; 3+ messages in thread
From: Han-Wen Nienhuys @ 2024-04-03  9:47 UTC (permalink / raw)
  To: git, Patrick Steinhardt

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Subject: [PATCH 3/9] refs/reftable: skip duplicate name checks
  2024-04-03  9:47 Subject: [PATCH 3/9] refs/reftable: skip duplicate name checks Han-Wen Nienhuys
@ 2024-04-03 11:21 ` Patrick Steinhardt
  2024-04-03 16:21   ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick Steinhardt @ 2024-04-03 11:21 UTC (permalink / raw)
  To: Han-Wen Nienhuys; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 1208 bytes --]

On Wed, Apr 03, 2024 at 11:47:10AM +0200, Han-Wen Nienhuys wrote:
> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Subject: [PATCH 3/9] refs/reftable: skip duplicate name checks
  2024-04-03 11:21 ` Patrick Steinhardt
@ 2024-04-03 16:21   ` Junio C Hamano
  0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2024-04-03 16:21 UTC (permalink / raw)
  To: Patrick Steinhardt; +Cc: Han-Wen Nienhuys, git

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-03 16:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-03  9:47 Subject: [PATCH 3/9] refs/reftable: skip duplicate name checks Han-Wen Nienhuys
2024-04-03 11:21 ` Patrick Steinhardt
2024-04-03 16:21   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).