Subject: Re: [PATCH 00/11] t: reduce direct disk access to data structures

From: Junio C Hamano <[email-masked]>
Date: Wed, 18 Oct 2023 08:32:01 -0700

Patrick Steinhardt <[email-masked]> writes:

> this patch series refactors a bunch of our tests to perform less direct
> disk access to on-disk data structures. Instead, the tests are converted
> to use Git tools or our test-tool to access data to the best extent
> possible. This serves two benefits:

Laudable goal.

>     - We increase test coverage of our own code base.

Meaning the new code added to test-tool for this series will also
get tested and bugs spotted?

>     - We become less dependent on the actual on-disk format.

Yes, this is very desirable.  Without looking at the implementation,
I see some issues aiming for this goal may involve. [a] using the
production code for validation would mean our expectation to be
compared to the reality to be validated can be affected by the same
bug, making two wrongs to appear right; [b] using a separate
implementation used only for validation would at least mean we will
have to make the same mistake in unique part of both implementations
that is less likely to miss bugs compared to [a], but bugs in shared
part of the production code and validation code will be hidden the
same way as [a].

But you have thought about this series a lot deeper and longer than
I have, so let me read on and find out what your solution is.

> The main motivation for this patch series was the second bullet point as
> it is preparatory work to get the reftable backend upstreamed.

Yay.

> My intent
> is to get rid of many or even most of the current blockers in the Git
> project before trying to send the reftable implementation upstream.
> While this will be a lot of up-front work that is going to span over a
> long time period, I think this approach will make everyones live easier
> by doing comparatively small and incremental improvements to the Git
> project.

Thank you very much for being considerate.  I assume this approach
is what those in the Contributors' Summit agreed to be the best way
forward to do anything sizeable.

> Ultimately, the final patch series should in the best case only
> contain the new backend as well as testing infrastructure, but not much
> else.

;-)