Re: ab/test-without-templates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 27 2022, Junio C Hamano wrote:

> Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes:
>
>> You may disagree with some or all of those, but this series doesn't try
>> to get you to agree with any of them. It's just making our tests more
>> sturdy and explicit in their intent by clearly declaring which parts of
>> them are relying on our default templates.
>>
>> So it's helping us spot issues like the one fixed in 7f44842ac19
>> (sparse-checkout: create leading directory, 2022-01-21) earlier.
>
> It's like arguing "this series is a bugfix, so what it fixes are by
> definition bugs", isn't it?

No, I don't think the test code is buggy as it stands now, but relying
on our default templates is making it easy to introduce new bugs in code
that doesn't handle other templates than the default.

This series doesn't get us all the way to running without that template
for all tests, but I have follow-up patches that do that, after these
changes that's a mostly a small matter of flipping the default, these
were most of the changes required in the test logic.

>> I really don't disagree with you per-se about us defining some minimum
>> viable template,...
>
> Well then it becomes debatable if it is a "bug" not to handle
> missing .git/info that needs "fixing" by this series, and it also
> makes it debatable if 7f44842a (sparse-checkout: create leading
> directory, 2022-01-21) was also a "bugfix", or just tightening
> against environment the end-user broke, no?

I don't think it's a broken environment. If you e.g. move .git/objects
to .git/objects.new you can't expect your repository to work, but we've
never implied or documented that about e.g. .git/hooks, .git/info etc.

And indeed almost all parts of git create the required paths on demand
and/or handle missing paths gracefully.

I don't see why we should take some stance that we're going to be
unhelpfully pedantic about repositories we find on-disk, even if we had
never had a "--template" option for "git init" to create such
repositories. I think 7f44842a was the right thing to do.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux