Can parse root .gitattributes file for a ref
What
Adds Repository#attributes_at(ref, file_path)
method to process .gitattributes
for a given branch.
Can optionally specify Edit: I've moved this to another MR (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16436)recursive: true
to use check-attr
, although we might choose not to imlement that if not needed straight away.
Why
Currently we can only check info/attributes
for the default branch. This doesn't really work with LFS where we expect users to track new files over time, resulting in different settings for different branches.
Acceptance criteria
-
Changelog entry added, if necessary -
Tests added for this feature/bug - Review
-
Has been reviewed by Backend
-
Related
First part of solving https://gitlab.com/gitlab-org/gitlab-ce/issues/41984
Edited by James Edwards-Jones