On Fri, Aug 27 2021, Ulrich Windl wrote:
quoted
quoted
quoted
Junio C Hamano [off-list ref] schrieb am 26.08.2021 um 19:38 in Nachricht
<xmqq1r6gf6ne.fsf@gitster.g>:
...
quoted
* It is hopefully becoming harder and harder to check for behaviour
in broken repositories in a "portable" way, simply because we are
making it harder to corrupt repository. We hopefully won't point
a ref to point at a missing object, we hopefully won't prune an
object away that is still pointed at by a ref, etc.
...
Maybe git needs a "--disarm-safety-belt" option that disables all those nice checks for testing purposes ;-)
I haven't tested, but I think in both of those cases a way to accomplish
this corruption in a way that bypasses the safety of our tooling is also
to setup an alternate object directory with the relevant object(s), and
then simply drop that alternate to simulate the case of an object
disappearing or other such corruption.