summaryrefslogtreecommitdiff
path: root/app/services/compare_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/compare_service.rb')
-rw-r--r--app/services/compare_service.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/services/compare_service.rb b/app/services/compare_service.rb
index d3d613661a6..2e4f8ee9dc8 100644
--- a/app/services/compare_service.rb
+++ b/app/services/compare_service.rb
@@ -3,18 +3,18 @@ require 'securerandom'
# Compare 2 branches for one repo or between repositories
# and return Gitlab::Git::Compare object that responds to commits and diffs
class CompareService
- attr_reader :source_project, :source_branch_name
+ attr_reader :base_project, :base_branch_name
- def initialize(new_source_project, new_source_branch_name)
- @source_project = new_source_project
- @source_branch_name = new_source_branch_name
+ def initialize(new_base_project, new_base_branch_name)
+ @base_project = new_base_project
+ @base_branch_name = new_base_branch_name
end
def execute(target_project, target_branch, straight: false)
# If compare with other project we need to fetch ref first
target_project.repository.with_repo_branch_commit(
- source_project.repository,
- source_branch_name) do |commit|
+ base_project.repository,
+ base_branch_name) do |commit|
break unless commit
compare(commit.sha, target_project, target_branch, straight)