Thread (1 message) 1 message, 1 author, 2024-02-15

Re: [PATCH 2/7] t0410: enable tests with extensions with non-default repo format

From: Junio C Hamano <hidden>
Date: 2024-02-15 17:18:37

Patrick Steinhardt [off-list ref] writes:
On Wed, Feb 14, 2024 at 02:57:55PM -0800, Junio C Hamano wrote:
quoted
Patrick Steinhardt [off-list ref] writes:
quoted
In t0410 we have two tests which exercise how partial clones behave in
the context of a repository with extensions. These tests are marked to
require a default repository using SHA1 and the "files" backend because
we explicitly set the repository format version to 0.

Changing the repository format version to 0 is not needed though. The
"noop" extension is ignored as expected regardless of what the version
is set to, same as the "nonsense" extension leads to failure regardless
of the version.
Isn't the reason why 11664196 kept the forcing of the format version
because it wanted to see noop ignored and nonsense failed even if
the format version is 0 to ensure the regression it fixed will stay
fixed?  IOW, we force version 0 not because we do not want to test
with anything but SHA1 and REFFILES; we pretty much assume that with
the default version, noop and nonsense will be handled sensibly, and
we want to make sure they will be with version 0 as well.

And once we force to version 0, we have trouble running with
anything other than SHA1 and REFFILES, hence these prerequisites.

So, I dunno.
Hum, I guess that's fair. Let me adapt the test case to instead use the
DEFAULT_REPO_FORMAT prerequisite then.
If we expect that "git init" by default will create version 0
repository in the foreseeable future (and when the default gets
fliped to create version 1, we will add CI task that forces version
0 somehow, just like we have special CI task to run test with ref
backend set to reftable), then I think the patch as posted may
actually be a good idea.  As long as somebody is checking these with
a repository in version 0 format, the original motivation behind the
tests is satisified, and if we in addition make sure noop and
nonsense are handled sensibly with higher versions, that would also
be good, too.

So perhaps we need some in-code comment next to these tests to
remind us about that, while removing these prerequisites?

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help