Commit graph

17 commits

Author SHA1 Message Date
GitLab Bot
619d0b6922 Add latest changes from gitlab-org/gitlab@master 2020-02-26 18:09:24 +00:00
GitLab Bot
b7dfe2ae40 Add latest changes from gitlab-org/gitlab@master 2019-09-13 13:26:31 +00:00
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
Jasper Maes
30e2a8f08c Fix several ActionController::Parameters deprecations 2019-01-11 21:19:01 +01: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
Mark Chao
5ee56c9afb lock permission 2018-06-06 21:01:45 +09:00
Robert Speicher
bd2b57d20b Bring CE-EE parity to app/services/lfs/unlock_file_service.rb 2018-05-17 11:43:54 -05: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
Rubén Dávila
bed9483211 Backport of LFS File Locking API 2018-02-07 09:04:00 -05:00
James Edwards-Jones
d2a77094ae File upload UI obeys LFS filters
Uses Lfs::FileModificationHandler to coordinate LFS detection, creation of LfsObject, etc

Caveats:
 1. This isn't used by the multi-file editor / Web IDE
 2. This isn't used on rename. We'd need to be able to download LFS files
    and add them to the commit if they no longer match so not as simple.
 3. We only check the root .gitattributes file, so this should be improved
    to correctly check for nested .gitattributes files in subfolders.
2018-02-06 15:26:25 +00:00