From: Patrick Steinhardt <ps@pks.im>
To: Karthik Nayak <karthik.188@gmail.com>
Cc: Justin Tobler <jltobler@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH 1/4] refs: move to using the '.optimize' functions
Date: Thu, 16 Oct 2025 14:11:56 +0200 [thread overview]
Message-ID: <aPDhDG1kfja8dWXv@pks.im> (raw)
In-Reply-To: <CAOLa=ZQGQ_Qan9PtE-akUpWwGg8j6y5xcKpyOpztN7bZp+rMvw@mail.gmail.com>
On Thu, Oct 16, 2025 at 07:07:33AM -0500, Karthik Nayak wrote:
> Patrick Steinhardt <ps@pks.im> writes:
> > On Wed, Oct 15, 2025 at 05:05:46PM -0500, Justin Tobler wrote:
> >> On 25/10/15 11:25PM, Karthik Nayak wrote:
> >> > @@ -430,7 +430,7 @@ struct ref_storage_be refs_be_debug = {
> >> > .transaction_finish = debug_transaction_finish,
> >> > .transaction_abort = debug_transaction_abort,
> >> >
> >> > - .pack_refs = debug_pack_refs,
> >> > + .optimize = debug_optimize,
> >>
> >> question: Was the debug backend not using either of these callbacks?
> >> From the commit message, it sounds like all the backends were using the
> >> optimize callback.
> >
> > Doesn't look like it. Overall I kind of doubt the value that this
> > backend has. I have never had even a single use case for it, and I have
> > been working with references extensively over the last two or three
> > years by now.
> >
> > Maybe we should just drop it eventually?
> >
> > Patrick
>
> I'd be happy to drop it too as a Git developer. But I can merit in
> keeping it. It does wrap around all reference subsystem calls and if
> tracing is enabled it would log these reference calls. This can be used
> in bug reports.
>
> However, a counter argument would be that these only track the surface
> level APIs to each backend, but not really the internal details.
>
> Considering this and also the fact that we need to update the backend
> for every change made, I'm for dropping it too.
Digging a bit deeper: I think this actually _is_ exposed via our tracing
API. So if you run Git with GIT_TRACE_REFS= set it will indeed use that
debug backend. TIL.
So with that I'll reverse my stance and say that this probably makes
sense to keep.
Patrick
next prev parent reply other threads:[~2025-10-16 12:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-15 21:25 [PATCH 0/4] refs: cleanup code around optimizations Karthik Nayak
2025-10-15 21:25 ` [PATCH 1/4] refs: move to using the '.optimize' functions Karthik Nayak
2025-10-15 22:05 ` Justin Tobler
2025-10-16 10:37 ` Patrick Steinhardt
2025-10-16 12:07 ` Karthik Nayak
2025-10-16 12:11 ` Patrick Steinhardt [this message]
2025-10-16 12:03 ` Karthik Nayak
2025-10-15 21:25 ` [PATCH 2/4] refs: cleanup code around optimization Karthik Nayak
2025-10-15 22:09 ` Justin Tobler
2025-10-15 21:25 ` [PATCH 3/4] refs: rename 'pack_refs_opts' to 'refs_optimize_opts' Karthik Nayak
2025-10-15 22:18 ` Justin Tobler
2025-10-16 12:15 ` Karthik Nayak
2025-10-15 21:25 ` [PATCH 4/4] t/pack-refs-tests: move the 'test_done' to callees Karthik Nayak
2025-10-16 10:38 ` [PATCH 0/4] refs: cleanup code around optimizations Patrick Steinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aPDhDG1kfja8dWXv@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=jltobler@gmail.com \
--cc=karthik.188@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).