git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: ab/test-without-templates
Date: Mon, 27 Jun 2022 20:23:06 +0200	[thread overview]
Message-ID: <220627.86zghygdtd.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <xmqqbkueqe5z.fsf@gitster.g>


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

> Ævar Arnfjörð Bjarmason <avarab@gmail.com> 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.

  reply	other threads:[~2022-06-27 18:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-22 19:32 What's cooking in git.git (Jun 2022, #07; Wed, 22) Junio C Hamano
2022-06-22 21:16 ` en/merge-tree (Was: Re: What's cooking in git.git (Jun 2022, #07; Wed, 22)) Elijah Newren
2022-06-22 23:13   ` en/merge-tree Junio C Hamano
2022-06-23 10:02   ` en/merge-tree (Was: Re: What's cooking in git.git (Jun 2022, #07; Wed, 22)) Johannes Schindelin
2022-06-23 10:55 ` ab/test-without-templates (was: " Ævar Arnfjörð Bjarmason
2022-06-23 22:12   ` ab/test-without-templates Junio C Hamano
2022-06-27 12:29     ` ab/test-without-templates Ævar Arnfjörð Bjarmason
2022-06-27 16:11       ` ab/test-without-templates Junio C Hamano
2022-06-27 18:23         ` Ævar Arnfjörð Bjarmason [this message]
2022-06-23 10:59 ` hx/unpack-streaming (was: What's cooking in git.git (Jun 2022, #07; Wed, 22)) Ævar Arnfjörð Bjarmason
2022-06-23 22:08   ` hx/unpack-streaming Junio C Hamano
2022-06-24  3:12 ` gc/submodule-update (was Re: What's cooking in git.git (Jun 2022, #07; Wed, 22)) Glen Choo
2022-06-24 15:35   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=220627.86zghygdtd.gmgdl@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).