Skip to content

Create commit API and Web IDE obey LFS filters

James Edwards-Jones requested to merge jej/commit-api-tracks-lfs into master

Split from https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16412

What

Creates an LFS pointer when gitattributes determines a file being uploaded should be handled through LFS.

Why

Are there points in the code the reviewer needs to double check?

This calls attributes_at_ref multiple times, so performance should be checked as advided in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16418#note_55552574 and caching considered if needed.

This doesn't check attirbutes perfectly, so might adversly affect the API. In particular we only check the root .gitattributes file and not ones in subfolders and don't correctly handle macros as mentioned in https://gitlab.com/gitlab-org/gitlab-ce/issues/41984#note_54372404.

Might users use the API to upload LFS pointers as well as files? We wouldn't want to double encode them.

Does this MR meet the acceptance criteria?

  • Changelog entry added, if necessary
  • Documentation created/updated
  • Tests added for this feature/bug
  • Review
    • Has been reviewed by UX
    • Has been reviewed by Frontend
    • Has been reviewed by Backend
    • Has been reviewed by Database
  • End-to-end tests pass (package-qa manual pipeline job)

Related

Edited by Dmytro Zaporozhets (DZ)

Merge request reports