WIP: Repository#attributes_at can traverse nested .gitattributes files
recursive: true param to
Repository#attributes_at to allow
.gitattributes files in subfolders to be checked.
Currenlty this is a WIP prototype using
read-tree and a temporary index. We might choose to do this with our existing ruby parser instead.
.gitattributes files in subfolders, and these are added by
lfs track when ran from a subdirectory. Currently we do not properly check these files when processing attributes.
When deciding what attributes are assigned to a path, Git consults $GIT_DIR/info/attributes file (which has the highest precedence), .gitattributes file in the same directory as the path in question, and its parent directories up to the toplevel of the work tree (the further the directory that contains .gitattributes is from the path in question, the lower its precedence). Finally global and system-wide files are considered (they have the lowest precedence).
- Changelog entry added, if necessary
- Tests added for this feature/bug
- Has been reviewed by Backend
Builds upon !16418 (merged)