We need to use the cached .gitattributes file for checking if a file
should be stored in the lfs.
Fix #18297
Signed-off-by: Andrew Thornton <art27@cantab.net>
filename2attribute2info, err := t.gitRepo.CheckAttribute(git.CheckAttributeOpts{
Attributes: []string{"filter"},
Filenames: []string{treePath},
+ CachedOnly: true,
})
if err != nil {
return nil, err
filename2attribute2info, err = t.gitRepo.CheckAttribute(git.CheckAttributeOpts{
Attributes: []string{"filter"},
Filenames: names,
+ CachedOnly: true,
})
if err != nil {
return err