list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <>
To: Junio C Hamano <>
Subject: Re: ab/test-without-templates
Date: Mon, 27 Jun 2022 14:29:50 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <xmqqr13fxc5l.fsf@gitster.g>

On Thu, Jun 23 2022, Junio C Hamano wrote:

> Ævar Arnfjörð Bjarmason <> writes:
>> On Wed, Jun 22 2022, Junio C Hamano wrote:
>>> * ab/test-without-templates (2022-06-06) 7 commits
>>>  - tests: don't assume a .git/info for .git/info/sparse-checkout
>>>  - tests: don't assume a .git/info for .git/info/exclude
>>>  - tests: don't assume a .git/info for .git/info/refs
>>>  - tests: don't assume a .git/info for .git/info/attributes
>>>  - tests: don't assume a .git/info for .git/info/grafts
>>>  - tests: don't depend on template-created .git/branches
>>>  - t0008: don't rely on default ".git/info/exclude"
>>>  Tweak tests so that they still work when the "git init" template
>>>  did not create .git/info directory.
>>>  Will merge to 'next'?
>>>  source: <>
>> Presumably the submitters vote doesn't count for much, but FWIW I think
>> it's ready & that there's nothing outstanding left to address.
> I do not think they make any particular test to break, but I do not
> think it is a good idea overall to give a false impression to the
> users that it is OK to use incomplete templates that lack things
> expected by Git in properly initialized repositories.  And these
> patches definitely take things in that wrong direction.

In the CL I mentioned some "future goals" goals that you may or may not
agree with, to elaborate on [1]:

 - Eventually running the whole test suite without "git init" creating
   repositories with templates.

 - Running without the bin-wrappers, which as mentions allows us to run
   faster, and improves our test coverage (it's hard to test some
   aspects of invoking "git", when really we're invoking a shellscript
   that invokes git).

 - Having some config option or other handy way to "git init" without
   templates (just formalizing the existing "--template=" invocation).

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.

I really don't disagree with you per-se about us defining some minimum
viable template, and declaring that pointing --template=* to an empty
directory is unsupported.

But I think it's unarguable that the status quo is leaving our users in
limbo on that question. Neither git-init(1) nor gitrepository-layout(5)
etc. cover that question.

Now, I think based on unsubmitted patches I've wrote that just handling
those cases in code is easier. I.e. it's a small matter of adding a
"mkdir x/y" before we create "x/y", and almost all of that code is code
we have already, so we're mostly supporting the "empty dir" template

But I'm not trying to argue for that here, nor is this series. What this
series does is make it easier to avoid bugs and unexpected behavior in
that are, whatever your position on the "minmum viable template"
question is.


  reply	other threads:[~2022-06-27 12:48 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     ` Ævar Arnfjörð Bjarmason [this message]
2022-06-27 16:11       ` ab/test-without-templates Junio C Hamano
2022-06-27 18:23         ` ab/test-without-templates Ævar Arnfjörð Bjarmason
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:

  List information:

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

  git send-email \ \ \ \ \

* 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 inbox:

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).