diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-01-06 23:29:13 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-01-06 23:29:13 +0800 |
commit | ccc73c455ba0b95b531c69414a6a1f47667f16b5 (patch) | |
tree | 914207fd6b9672bf2a46ea4b37c59b37444a4d91 /app/services/compare_service.rb | |
parent | e3c36850a618ee2f7f9087b681e62d8a50e7b1b1 (diff) | |
download | gitlab-ce-ccc73c455ba0b95b531c69414a6a1f47667f16b5.tar.gz |
Rename from base to start because base could mean merge base
Diffstat (limited to 'app/services/compare_service.rb')
-rw-r--r-- | app/services/compare_service.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/services/compare_service.rb b/app/services/compare_service.rb index 2e4f8ee9dc8..ab4c02a97a0 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 :base_project, :base_branch_name + attr_reader :start_project, :start_branch_name - def initialize(new_base_project, new_base_branch_name) - @base_project = new_base_project - @base_branch_name = new_base_branch_name + def initialize(new_start_project, new_start_branch_name) + @start_project = new_start_project + @start_branch_name = new_start_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( - base_project.repository, - base_branch_name) do |commit| + start_project.repository, + start_branch_name) do |commit| break unless commit compare(commit.sha, target_project, target_branch, straight) |