tests: don't assume a .git/info for .git/info/exclude
commit1d758728fb26f574169b7f0b420e59af1d0c3c84
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Fri, 3 Jun 2022 11:15:08 +0000 (3 13:15 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Jun 2022 19:00:21 +0000 (6 12:00 -0700)
tree6ae00b155e4436ad23649b19124a7da305ce643d
parentce5369e3ef0078458a0608be9ddeb2b276e61b62
tests: don't assume a .git/info for .git/info/exclude

Change those tests that assumed that a .git/info directory would be
created for them when writing .git/info/exclude to explicitly create
the directory by setting "TEST_CREATE_REPO_NO_TEMPLATE=1" before
sourcing test-lib.sh, and using the "--template=" argument to "git
clone" and "git init".

In the case of ".git/modules/sub1/info" we deviate from the
established pattern in this and preceding commits of passing a
"--template=" and doing a "mkdir .git/info".

In that case "git checkout" will run the "submodule--helper clone",
and both e.g. "git submodule update --init" and "git checkout" do not
have a way to pass down options to the eventual "git init" or "git
clone". Let's instead assume that the submodule was populated with our
default templates, remove them, and then run the "mkdir".

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/lib-submodule-update.sh
t/t0008-ignores.sh
t/t3426-rebase-submodule.sh
t/t7063-status-untracked-cache.sh