+4
-1
index 143f100517..f7ee2f2ff0 100755
--- a/t/t0003-attributes.sh
+++ b/t/t0003-attributes.sh
test_description=gitattributes
TEST_PASSES_SANITIZE_LEAK=true
+TEST_CREATE_REPO_NO_TEMPLATE=1
. ./test-lib.sh
attr_check_basic () {
'
test_expect_success 'setup bare' '
- git clone --bare . bare.git
+ git clone --template= --bare . bare.git
'
test_expect_success 'bare repository: check that .gitattribute is ignored' '
test_expect_success 'bare repository: test info/attributes' '
(
cd bare.git &&
+ mkdir info &&
(
echo "f test=f" &&
echo "a/i test=a/i"
test_expect_success SYMLINKS 'symlinks respected in info/attributes' '
test_when_finished "rm .git/info/attributes" &&
+ mkdir .git/info &&
ln -s ../../attr .git/info/attributes &&
attr_check file set
'
t/t0028-working-tree-encoding.sh
+2
index 82905a2156..7140960e1a 100755
--- a/t/t0028-working-tree-encoding.sh
+++ b/t/t0028-working-tree-encoding.sh
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+TEST_CREATE_REPO_NO_TEMPLATE=1
. ./test-lib.sh
. "$TEST_DIRECTORY/lib-encoding.sh"
test_when_finished "rm -f test.utf32.git" &&
test_when_finished "git reset --hard HEAD" &&
+ mkdir .git/info &&
echo "*.utf32 text working-tree-encoding=utf-32" >.git/info/attributes &&
git add test.utf32 &&
+4
-1
index 7f8d2ab0a7..de192b52c4 100755
--- a/t/t5000-tar-tree.sh
+++ b/t/t5000-tar-tree.sh
'
+TEST_CREATE_REPO_NO_TEMPLATE=1
. ./test-lib.sh
SUBSTFORMAT=%H%n
test_expect_success \
'add ignored file' \
'echo ignore me >a/ignored &&
+ mkdir .git/info &&
echo ignored export-ignore >.git/info/attributes'
test_expect_success 'add files to repository' '
'
test_expect_success 'create bare clone' '
- git clone --bare . bare.git &&
+ git clone --template= --bare . bare.git &&
+ mkdir bare.git/info &&
cp .git/info/attributes bare.git/info/attributes
'
+4
-1
index 712ae52299..2f6eef5e37 100755
--- a/t/t5001-archive-attr.sh
+++ b/t/t5001-archive-attr.sh
test_description='git archive attribute tests'
+TEST_CREATE_REPO_NO_TEMPLATE=1
. ./test-lib.sh
SUBSTFORMAT='%H (%h)%n'
test_expect_success 'setup' '
echo ignored >ignored &&
+ mkdir .git/info &&
echo ignored export-ignore >>.git/info/attributes &&
git add ignored &&
git commit -m. &&
- git clone --bare . bare &&
+ git clone --template= --bare . bare &&
+ mkdir bare/info &&
cp .git/info/attributes bare/info/attributes
'
t/t5002-archive-attr-pattern.sh
+4
-1
index a66b5ba27e..78ab75f1bc 100755
--- a/t/t5002-archive-attr-pattern.sh
+++ b/t/t5002-archive-attr-pattern.sh
test_description='git archive attribute pattern tests'
TEST_PASSES_SANITIZE_LEAK=true
+TEST_CREATE_REPO_NO_TEMPLATE=1
. ./test-lib.sh
test_expect_exists() {
test_expect_success 'setup' '
echo ignored >ignored &&
+ mkdir .git/info &&
echo ignored export-ignore >>.git/info/attributes &&
git add ignored &&
git commit -m. &&
- git clone --bare . bare &&
+ git clone --template= --bare . bare &&
+ mkdir bare/info &&
cp .git/info/attributes bare/info/attributes
'
+4
-1
index d726964307..a7bbfcb7f7 100755
--- a/t/t5003-archive-zip.sh
+++ b/t/t5003-archive-zip.sh
test_description='git archive --format=zip test'
+TEST_CREATE_REPO_NO_TEMPLATE=1
. ./test-lib.sh
SUBSTFORMAT=%H%n
test_expect_success \
'add ignored file' \
'echo ignore me >a/ignored &&
+ mkdir .git/info &&
echo ignored export-ignore >.git/info/attributes'
test_expect_success 'add files to repository' '
'
test_expect_success 'create bare clone' '
- git clone --bare . bare.git &&
+ git clone --template= --bare . bare.git &&
+ mkdir bare.git/info &&
cp .git/info/attributes bare.git/info/attributes &&
# Recreate our changes to .git/config rather than just copying it, as
# we do not want to clobber core.bare or other settings.
t/t7814-grep-recurse-submodules.sh
+6
-2
index a4476dc492..3ad80526c4 100755
--- a/t/t7814-grep-recurse-submodules.sh
+++ b/t/t7814-grep-recurse-submodules.sh
submodules.
'
+TEST_CREATE_REPO_NO_TEMPLATE=1
. ./test-lib.sh
GIT_TEST_FATAL_REGISTER_SUBMODULE_ODB=1
test_expect_failure 'grep --textconv: superproject .git/info/attributes does not affect submodules' '
reset_and_clean &&
test_config_global diff.d2x.textconv "sed -e \"s/d/x/\"" &&
- super_attr="$(git rev-parse --git-path info/attributes)" &&
+ super_info="$(git rev-parse --git-path info)" &&
+ super_attr="$super_info/attributes" &&
test_when_finished "rm -f \"$super_attr\"" &&
+ mkdir "$super_info" &&
echo "a diff=d2x" >"$super_attr" &&
cat >expect <<-\EOF &&
reset_and_clean &&
test_config_global diff.d2x.textconv "sed -e \"s/d/x/\"" &&
- submodule_attr="$(git -C submodule rev-parse --path-format=absolute --git-path info/attributes)" &&
+ submodule_info="$(git -C submodule rev-parse --path-format=absolute --git-path info)" &&
+ submodule_attr="$submodule_info/attributes" &&
test_when_finished "rm -f \"$submodule_attr\"" &&
echo "a diff=d2x" >"$submodule_attr" &&