Re: [PATCH] RFC: refs: add GIT_DEBUG_REFS debugging mechanism
- From
Jeff King <peff@peff.net>
- Date
- Sep 3, 2020, 06:19 UTC
- Message-ID
- <20200903061931.GA2055118@coredump.intra.peff.net>
- In-Reply-To
- <20200903054422.GG4035286@google.com>
On Wed, Sep 02, 2020 at 10:44:22PM -0700, Jonathan Nieder wrote:
Show 5 quoted lines
> Summary: > > - if this is only going to be used for tests and for ad hoc debugging, > I'd suggest sticking to the simple trace_key based unstructured > tracing API
Yeah, from my look at the debug patch, this seems sensible.
As clever as the "debug" ref-backend wrapper object is, I also wonder if it might be simpler to just add trace calls to all of the outer functions (e.g., ref_transaction_prepare(), etc). Unlike a "real" OO system, we're not typically passing around the polymorphic ref_store type, but always access it through those type-agnostic wrappers. But maybe that would end up just as long. I dunno.
-Peff