Skip to content

Can parse root .gitattributes file for a ref

James Edwards-Jones requested to merge jej/gitattributes-check-at-ref into master

What

Adds Repository#attributes_at(ref, file_path) method to process .gitattributes for a given branch.

Can optionally specify recursive: true to use check-attr, although we might choose not to imlement that if not needed straight away. Edit: I've moved this to another MR (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16436)

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

Merge request reports