gitattributes not applying in subdirectories
Summary
Files in subdirectories do not seem to be tagged correctly with the gitlab-language attribute,
but those same files are tagged correctly in the repository root.
They should be treated the same because git shows the same attributes on both when checked with git check-attr.
Steps to reproduce
- Create a file with an unknown extension in the repository root; e.g.,
Dockerfile.local - Create a file with the same unknown extension in a subdirectory; e.g.,
docker/Dockerfile.local - Add a rule to
.gitattributesto give those files thegitlab-languageattribute, e.g.,Dockerfile.* gitlab-language=dockerfile - Observe that the file in the repository root is correctly highlighted, but the one in the subdirectory is not
- Observe that both files have the same attributes when queried with
git check-attr -a
Example Project
https://gitlab.com/iamthad/gitattributes-bug-repro
What is the current bug behavior?
The file in the subdirectory is not highlighted as specified by the gitlab-language attribute,
unlike the file in the repository root.
What is the expected correct behavior?
The file in the subdirectory should be highlighted as specified by the gitlab-language attribute,
just like the file in the repository root is.
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com

