Merge branch 'ab/test-without-templates'

Tweak tests so that they still work when the "git init" template
did not create .git/info directory.

* ab/test-without-templates:
  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"
This commit is contained in:
Junio C Hamano
2022-07-18 13:31:55 -07:00
30 changed files with 97 additions and 27 deletions

View File

@ -11,6 +11,7 @@ test_description='sparse checkout tests
A init.t
'
TEST_CREATE_REPO_NO_TEMPLATE=1
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-read-tree.sh
@ -53,6 +54,7 @@ test_expect_success 'read-tree without .git/info/sparse-checkout' '
'
test_expect_success 'read-tree with .git/info/sparse-checkout but disabled' '
mkdir .git/info &&
echo >.git/info/sparse-checkout &&
read_tree_u_must_succeed -m -u HEAD &&
git ls-files -t >result &&