diff options
author | James Edwards-Jones <jedwardsjones@gitlab.com> | 2018-03-14 23:45:57 +0000 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2018-03-15 21:49:00 +0000 |
commit | 237a32cc90d7e2c4b96e3a9ba0fd9e77ff3fc166 (patch) | |
tree | 1ad0bd7901dd016f0bf4c63a76a9bff927a5a10c /app/services/files/create_service.rb | |
parent | 1baac9211238f60d2d2a50cccd0bea6979bfa6ba (diff) | |
download | gitlab-ce-237a32cc90d7e2c4b96e3a9ba0fd9e77ff3fc166.tar.gz |
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.
Diffstat (limited to 'app/services/files/create_service.rb')
-rw-r--r-- | app/services/files/create_service.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/services/files/create_service.rb b/app/services/files/create_service.rb index b8ae03842a3..a954564946b 100644 --- a/app/services/files/create_service.rb +++ b/app/services/files/create_service.rb @@ -1,10 +1,11 @@ module Files class CreateService < Files::BaseService def create_commit! - Lfs::FileTransformer.link_lfs_objects(project, @branch_name) do |transformer| - content_or_lfs_pointer = transformer.new_file(@file_path, @file_content) - create_transformed_commit(content_or_lfs_pointer) - end + transformer = Lfs::FileTransformer.new(project, @branch_name) + + result = transformer.new_file(@file_path, @file_content) + + create_transformed_commit(result.content) end private |