Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-01-06 17:05:30 +0300
committerLin Jen-Shin <godfat@godfat.org>2017-01-06 17:05:30 +0300
commita4b97b2cb61c03d08e25cf2cd7fcbb3f21611350 (patch)
tree5d19444b07a143eb6cac69f5a64f41792455e40d /app/services/compare_service.rb
parent593228ffe3b2e4ff82c4d63e5d5c59b835f70085 (diff)
Rename source to base to avoid confusion from MR
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)