Merge branch 'jc/no-default-attr-tree-in-bare'
Git 2.43 started using the tree of HEAD as the source of attributes in a bare repository, which has severe performance implications. For now, revert the change, without ripping out a more explicit support for the attr.tree configuration variable. * jc/no-default-attr-tree-in-bare: stop using HEAD for attributes in bare repository by default
This commit is contained in:
@ -398,13 +398,19 @@ test_expect_success 'bad attr source defaults to reading .gitattributes file' '
|
||||
)
|
||||
'
|
||||
|
||||
test_expect_success 'bare repo defaults to reading .gitattributes from HEAD' '
|
||||
test_expect_success 'bare repo no longer defaults to reading .gitattributes from HEAD' '
|
||||
test_when_finished rm -rf test bare_with_gitattribute &&
|
||||
git init test &&
|
||||
test_commit -C test gitattributes .gitattributes "f/path test=val" &&
|
||||
git clone --bare test bare_with_gitattribute &&
|
||||
echo "f/path: test: val" >expect &&
|
||||
|
||||
echo "f/path: test: unspecified" >expect &&
|
||||
git -C bare_with_gitattribute check-attr test -- f/path >actual &&
|
||||
test_cmp expect actual &&
|
||||
|
||||
echo "f/path: test: val" >expect &&
|
||||
git -C bare_with_gitattribute -c attr.tree=HEAD \
|
||||
check-attr test -- f/path >actual &&
|
||||
test_cmp expect actual
|
||||
'
|
||||
|
||||
|
Reference in New Issue
Block a user