diff --git a/Gemfile b/Gemfile index 1fc1be9e2724c71ec3e725d2e3661ee75094c27f..cce820fb53ad66bdace578689815e2c44a63a8ad 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,7 @@ gem 'browser', '~> 2.2' # Extracting information from a git repository # Provide access to Gitlab::Git library -gem "gitlab_git", '~> 10.2', path: "~/src/Gitlab/gitlab_git" +gem "gitlab_git", '~> 10.2', git: "git@gitlab.com:gitlab-org/gitlab_git.git", branch: "commit-blob-rename-action" # LDAP Auth # GitLab fork with several improvements to original library. For full list of changes diff --git a/Gemfile.lock b/Gemfile.lock index d65616ad766588d8bc2d3bb633526c7f33f89718..3eaef21487556883d7504316d9f994f796343190 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,5 +1,7 @@ -PATH - remote: ~/src/Gitlab/gitlab_git +GIT + remote: git@gitlab.com:gitlab-org/gitlab_git.git + revision: 0e4ac299b806fa4190c4928a1c1ed5372fffbb38 + branch: commit-blob-rename-action specs: gitlab_git (10.3.0) activesupport (~> 4.0) @@ -401,7 +403,6 @@ GEM mail_room (0.8.0) method_source (0.8.2) mime-types (2.99.2) - mime-types-data (3.2016.0521) mimemagic (0.3.0) mini_portile2 (2.1.0) minitest (5.7.0) diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index a3731b45df0afaf06194239b05b5838e02c8c676..036805306f25b444e7db4ecf1daf67ad1e890fa6 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -12,16 +12,8 @@ module CreatesCommit previous_path: @previous_path ) - puts "#" * 10 - puts @previous_path - puts "#" * 10 - result = service.new(@tree_edit_project, current_user, commit_params).execute - puts "#" * 30 - puts result[:status] - puts "#" * 30 - if result[:status] == :success update_flash_notice(success_notice) diff --git a/app/models/repository.rb b/app/models/repository.rb index e8a1874621633db8d802363737be9a06326e3e5c..a391820a8ba97a8a0d60d92a185e029d8078057c 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -753,9 +753,6 @@ class Repository Gitlab::Git::Blob.rename(raw_repository, options) else - puts "#" * 90 - puts "World" - puts "#" * 90 Gitlab::Git::Blob.commit(raw_repository, options) end end diff --git a/app/services/files/update_service.rb b/app/services/files/update_service.rb index fefa1d4ef68f2c48c96daff5d12154ca159ca2dd..41add13af50dd3228b0eb01d3b01cba94612a3f7 100644 --- a/app/services/files/update_service.rb +++ b/app/services/files/update_service.rb @@ -3,6 +3,7 @@ require_relative "base_service" module Files class UpdateService < Files::BaseService def commit + repository.update_file(current_user, @file_path, @previous_path, @file_content, @commit_message, @target_branch, true) end end