From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Derrick Stolee" <derrickstolee@github.com>,
"Adam Spiers" <git@adamspiers.org>, "Jeff King" <peff@peff.net>,
"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
"Eric Sunshine" <sunshine@sunshineco.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH v2 0/7] tests: don't depend on "git init" using the template
Date: Fri, 3 Jun 2022 13:15:02 +0200 [thread overview]
Message-ID: <cover-v2-0.7-00000000000-20220603T110506Z-avarab@gmail.com> (raw)
In-Reply-To: <cover-00.13-00000000000-20211212T201308Z-avarab@gmail.com>
This reduced-in-scope re-roll of [1] changes those tests that
implicitly relied on the existence of the default "git init" template
to no longer do so. This makes the intent of the tests more explicit,
e.g. in the case of the .git/branch directory.
Parts of the v1 were already split up, re-rolled and merged as
a5bf611cc4f (Merge branch 'ab/hook-tests-updates', 2022-03-30).
Future goals: I then have a local topic on top of this to add the
"--no-template" option to "git init", and to have the test suite run
in that mode by default, that's currently one of the blockers for
making the test run without the bin-wrappers[2], which as noted in [3]
leaves us with some blind spots in our tests.
But for now this is all relatively straightforward conversion of
existing tests to make them not rely on "git init" giving them a
template, which they opt-in to with a new TEST_CREATE_REPO_NO_TEMPLATE
variable.
Junio: There's a trivial conflict in one of the tests with "next",
i.e.:
diff --cc t/t6101-rev-parse-parents.sh
index 5f55ab98d35,a3a41c7a3e4..00000000000
--- a/t/t6101-rev-parse-parents.sh
+++ b/t/t6101-rev-parse-parents.sh
@@@ -8,7 -8,7 +8,11 @@@ test_description='Test git rev-parse wi
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
++<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< HEAD
+TEST_CREATE_REPO_NO_TEMPLATE=1
++================================
+ TEST_PASSES_SANITIZE_LEAK=true
++>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> origin/seen
The resolution is to keep both sides, i.e. to end up with:
TEST_CREATE_REPO_NO_TEMPLATE=1
TEST_PASSES_SANITIZE_LEAK=true
1. https://lore.kernel.org/git/cover-00.13-00000000000-20211212T201308Z-avarab@gmail.com/
2. https://lore.kernel.org/git/220405.86k0c3lt2l.gmgdl@evledraar.gmail.com/
3. https://lore.kernel.org/git/211124.86sfvld4cl.gmgdl@evledraar.gmail.com/
Ævar Arnfjörð Bjarmason (7):
t0008: don't rely on default ".git/info/exclude"
tests: don't depend on template-created .git/branches
tests: don't assume a .git/info for .git/info/grafts
tests: don't assume a .git/info for .git/info/attributes
tests: don't assume a .git/info for .git/info/refs
tests: don't assume a .git/info for .git/info/exclude
tests: don't assume a .git/info for .git/info/sparse-checkout
t/annotate-tests.sh | 3 ++-
t/lib-submodule-update.sh | 7 +++++--
t/t0003-attributes.sh | 5 ++++-
t/t0008-ignores.sh | 12 +++++++-----
t/t0028-working-tree-encoding.sh | 2 ++
t/t1011-read-tree-sparse-checkout.sh | 2 ++
t/t1090-sparse-checkout-scope.sh | 5 ++++-
t/t1301-shared-repo.sh | 3 ++-
t/t2018-checkout-branch.sh | 4 +++-
t/t2400-worktree-add.sh | 4 ++++
t/t3426-rebase-submodule.sh | 1 +
t/t3507-cherry-pick-conflict.sh | 2 ++
t/t5000-tar-tree.sh | 5 ++++-
t/t5001-archive-attr.sh | 5 ++++-
t/t5002-archive-attr-pattern.sh | 5 ++++-
t/t5003-archive-zip.sh | 5 ++++-
t/t5318-commit-graph.sh | 3 ++-
t/t5505-remote.sh | 6 ++++--
t/t5516-fetch-push.sh | 16 ++++++++++++++--
t/t5550-http-fetch-dumb.sh | 3 ++-
t/t6001-rev-list-graft.sh | 1 +
t/t6101-rev-parse-parents.sh | 2 ++
t/t6435-merge-sparse.sh | 2 ++
t/t7063-status-untracked-cache.sh | 3 ++-
t/t7418-submodule-sparse-gitmodules.sh | 3 ++-
t/t7814-grep-recurse-submodules.sh | 8 ++++++--
t/t8001-annotate.sh | 1 +
t/t8002-blame.sh | 1 +
t/t8012-blame-colors.sh | 1 +
t/test-lib.sh | 4 +++-
30 files changed, 97 insertions(+), 27 deletions(-)
Range-diff against v1:
1: 5526d3dc838 < -: ----------- t0001: fix gaps in "TEMPLATE DIRECTORY" coverage
2: ef2b67768cf < -: ----------- init: split out template population from create_default_files()
3: 784b7947512 < -: ----------- init: unconditionally create the "info" directory
4: 3d4ea5c5d30 = 1: 21927e21832 t0008: don't rely on default ".git/info/exclude"
5: 6bbb39f13fc < -: ----------- init & clone: add a --no-template option
6: 2f478f7ba4a < -: ----------- init & clone: add init.templateDir=[bool]
7: 9402fb23b40 < -: ----------- test-lib: create test data with "git init --no-template" (almost)
8: 0c9b953dd43 < -: ----------- tests: don't depend on template-created .git/branches
9: d97122f5fd8 < -: ----------- t5540: don't rely on "hook/post-update.sample"
10: ca55471d134 < -: ----------- test-lib-functions: add and use a "write_hook" wrapper
11: 6f805f7ebac < -: ----------- tests: change "cat && chmod +x" to use "write_hook"
12: 2acbaa77f8d < -: ----------- tests: migrate miscellaneous "write_script" to "write_hooks"
13: d021a5981a1 < -: ----------- tests: don't depend on template-created .git/hooks
-: ----------- > 2: c4d0e6c684b tests: don't depend on template-created .git/branches
-: ----------- > 3: 967762b4670 tests: don't assume a .git/info for .git/info/grafts
-: ----------- > 4: 64292c20c84 tests: don't assume a .git/info for .git/info/attributes
-: ----------- > 5: b9f667bf292 tests: don't assume a .git/info for .git/info/refs
-: ----------- > 6: 29da5a3d431 tests: don't assume a .git/info for .git/info/exclude
-: ----------- > 7: 0149c80f09c tests: don't assume a .git/info for .git/info/sparse-checkout
--
2.36.1.1119.g5a713b43bd4
next prev parent reply other threads:[~2022-06-03 11:15 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-12 20:13 [PATCH 00/13] tests + init: don't rely on templates & add --no-template + config Ævar Arnfjörð Bjarmason
2021-12-12 20:13 ` [PATCH 01/13] t0001: fix gaps in "TEMPLATE DIRECTORY" coverage Ævar Arnfjörð Bjarmason
2021-12-12 20:13 ` [PATCH 02/13] init: split out template population from create_default_files() Ævar Arnfjörð Bjarmason
2021-12-12 20:13 ` [PATCH 03/13] init: unconditionally create the "info" directory Ævar Arnfjörð Bjarmason
2021-12-20 15:59 ` Derrick Stolee
2021-12-20 16:13 ` Ævar Arnfjörð Bjarmason
2021-12-20 17:39 ` Derrick Stolee
2021-12-20 18:16 ` Ævar Arnfjörð Bjarmason
2021-12-20 19:06 ` Junio C Hamano
2021-12-21 1:15 ` Ævar Arnfjörð Bjarmason
2021-12-21 2:10 ` Junio C Hamano
2021-12-21 2:39 ` Ævar Arnfjörð Bjarmason
2021-12-21 6:38 ` Junio C Hamano
2021-12-24 17:26 ` Ævar Arnfjörð Bjarmason
2021-12-25 1:58 ` Junio C Hamano
2022-01-12 12:42 ` Ævar Arnfjörð Bjarmason
2022-01-18 19:43 ` Derrick Stolee
2022-01-19 1:00 ` Ævar Arnfjörð Bjarmason
2021-12-12 20:13 ` [PATCH 04/13] t0008: don't rely on default ".git/info/exclude" Ævar Arnfjörð Bjarmason
2021-12-12 20:13 ` [PATCH 05/13] init & clone: add a --no-template option Ævar Arnfjörð Bjarmason
2021-12-12 20:13 ` [PATCH 06/13] init & clone: add init.templateDir=[bool] Ævar Arnfjörð Bjarmason
2021-12-12 20:13 ` [PATCH 07/13] test-lib: create test data with "git init --no-template" (almost) Ævar Arnfjörð Bjarmason
2021-12-12 20:13 ` [PATCH 08/13] tests: don't depend on template-created .git/branches Ævar Arnfjörð Bjarmason
2021-12-12 20:13 ` [PATCH 09/13] t5540: don't rely on "hook/post-update.sample" Ævar Arnfjörð Bjarmason
2021-12-12 20:13 ` [PATCH 10/13] test-lib-functions: add and use a "write_hook" wrapper Ævar Arnfjörð Bjarmason
2021-12-13 14:15 ` Eric Sunshine
2021-12-13 16:29 ` Ævar Arnfjörð Bjarmason
2021-12-13 16:45 ` Eric Sunshine
2021-12-13 19:37 ` Ævar Arnfjörð Bjarmason
2021-12-13 21:33 ` Eric Sunshine
2021-12-12 20:13 ` [PATCH 11/13] tests: change "cat && chmod +x" to use "write_hook" Ævar Arnfjörð Bjarmason
2021-12-12 20:13 ` [PATCH 12/13] tests: migrate miscellaneous "write_script" to "write_hooks" Ævar Arnfjörð Bjarmason
2021-12-12 20:13 ` [PATCH 13/13] tests: don't depend on template-created .git/hooks Ævar Arnfjörð Bjarmason
2022-06-03 11:15 ` Ævar Arnfjörð Bjarmason [this message]
2022-06-03 11:15 ` [PATCH v2 1/7] t0008: don't rely on default ".git/info/exclude" Ævar Arnfjörð Bjarmason
2022-06-03 11:15 ` [PATCH v2 2/7] tests: don't depend on template-created .git/branches Ævar Arnfjörð Bjarmason
2022-06-03 11:15 ` [PATCH v2 3/7] tests: don't assume a .git/info for .git/info/grafts Ævar Arnfjörð Bjarmason
2022-06-03 11:15 ` [PATCH v2 4/7] tests: don't assume a .git/info for .git/info/attributes Ævar Arnfjörð Bjarmason
2022-06-03 11:15 ` [PATCH v2 5/7] tests: don't assume a .git/info for .git/info/refs Ævar Arnfjörð Bjarmason
2022-06-03 11:15 ` [PATCH v2 6/7] tests: don't assume a .git/info for .git/info/exclude Ævar Arnfjörð Bjarmason
2022-06-03 11:15 ` [PATCH v2 7/7] tests: don't assume a .git/info for .git/info/sparse-checkout Ævar Arnfjörð Bjarmason
2022-06-03 19:17 ` [PATCH v2 0/7] tests: don't depend on "git init" using the template Junio C Hamano
2022-06-04 0:41 ` Ævar Arnfjörð Bjarmason
2022-06-06 19:08 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover-v2-0.7-00000000000-20220603T110506Z-avarab@gmail.com \
--to=avarab@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=derrickstolee@github.com \
--cc=git@adamspiers.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=sunshine@sunshineco.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.
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 NNTP newsgroup(s).