From 9cc15172deaa4582c5fd956cc163539041d018b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Rodr=C3=ADguez?= Date: Fri, 6 Oct 2017 20:47:06 -0300 Subject: Clean hierarchy of calls between models and Gitalb::Git for blob search --- app/models/repository.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'app/models') diff --git a/app/models/repository.rb b/app/models/repository.rb index bf526ca1762..579aa2b2f05 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -468,9 +468,7 @@ class Repository end def blob_at(sha, path) - unless Gitlab::Git.blank_ref?(sha) - Blob.decorate(Gitlab::Git::Blob.find(self, sha, path), project) - end + Blob.decorate(raw_repository.blob_at(sha, path), project) rescue Gitlab::Git::Repository::NoRepository nil end -- cgit v1.2.1 From 3fcab51ebb0f3156b5d732d050b292cd3e081262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Rodr=C3=ADguez?= Date: Fri, 6 Oct 2017 22:41:23 -0300 Subject: Refactor conflict resolution to contain git ops within Gitlab::Git This prepares the codebase for a Gitaly migration. See https://gitlab.com/gitlab-org/gitaly/issues/553 --- app/models/repository.rb | 8 -------- 1 file changed, 8 deletions(-) (limited to 'app/models') diff --git a/app/models/repository.rb b/app/models/repository.rb index 579aa2b2f05..2adf51df9d6 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -912,14 +912,6 @@ class Repository end end - def resolve_conflicts(user, branch_name, params) - with_branch(user, branch_name) do - committer = user_to_committer(user) - - create_commit(params.merge(author: committer, committer: committer)) - end - end - def merged_to_root_ref?(branch_name) branch_commit = commit(branch_name) root_ref_commit = commit(root_ref) -- cgit v1.2.1