Commit graph

10 commits

Author SHA1 Message Date
Luke Duncalfe
dcf811ba14 CE backport for changes in EE MR 14017
This backports to CE changes to allow the EE model
DesignManagement::Repository to override the #attributes_at method to
provide its own git attributes.

The #attributes_at method was freely available, as it's never called by
anything in the app. It looks like the code that called it got
refactored out of existence in ca66a04f. It was still being called in a
spec
85b29c1c2f/spec/services/files/create_service_spec.rb (L40)
which I've left because with the change in Lfs::FileTransformer in fact
is now again the perfect test!

See EE MR
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14017

And these comment threads
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/13894#note_178002089
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/13894#note_178049984
2019-06-19 17:51:57 +00:00
Luke Duncalfe
f7163afb8a CE backport for changes in EE MR 13894
This backports to CE changes that allow the recording of the
repository_type in the table lfs_objects_projects.

This is in order to allow future pruning of unreferenced LFS objects,
as we will need to know which repository to look in for the LFS pointer
file.

The EE MR that contains the original code and a full explanation of the
changes is
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/13894

EE Issue https://gitlab.com/gitlab-org/gitlab-ee/issues/9490

Note that there was a lot of CE code changed in the EE MR because we
want to allow the wiki repository to also use LFS. See
https://gitlab.com/gitlab-org/gitlab-ce/issues/43721. As the wiki is
an unlicensed feature, a full backport is required to enable this.
2019-06-17 11:23:06 +12:00
Patrick Bajao
e20e062737 Fix uploading of LFS tracked file through UI 2019-05-06 12:51:49 +00:00
Yorick Peterse
2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
gfyoung
fbde835404 Enable more frozen string in app/services/**/*.rb
Partially addresses #47424.
2018-07-17 15:19:40 -07:00
James Edwards-Jones
1f5e809c04 Use correct encoding with Lfs::FileTransfromer 2018-03-15 21:49:01 +00:00
James Edwards-Jones
ca66a04ffe Lfs::FileTranformer caches .gitattributes parser
Prevents `.gitattributes` blob lookup being repeated for every file checked at a given ref
2018-03-15 21:49:01 +00:00
James Edwards-Jones
237a32cc90 Avoid failed integrity check by linking LfsObjectProjects sooner
Attempted commits were failing due to the pre-recieve LfsIntegrity
check. This is skipped during tests making this failure silent.
2018-03-15 21:49:00 +00:00
James Edwards-Jones
1baac92112 Multi-file upload and Commit API obey LFS filters
Updates Files::MultiService for the commits API which is in turn used by the
multi-file upload web UI

Ensures that files which should be in LFS are transformed into LFS pointers
Uses Lfs::Transformer which then links LfsObjectProjects on success
2018-03-15 02:39:08 +00:00
James Edwards-Jones
ffb1c65b0b Rename Lfs::FileModificationHandler to Lfs::FileTransformer 2018-03-15 02:39:08 +00:00
Renamed from app/services/lfs/file_modification_handler.rb (Browse further)