Create commit API and Web IDE obey LFS filters
Creates an LFS pointer when gitattributes determines a file being uploaded should be handled through LFS.
Are there points in the code the reviewer needs to double check?
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
- 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-qamanual pipeline job)