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 18:29:13 +0300
committerLin Jen-Shin <godfat@godfat.org>2017-01-06 18:29:13 +0300
commitccc73c455ba0b95b531c69414a6a1f47667f16b5 (patch)
tree914207fd6b9672bf2a46ea4b37c59b37444a4d91 /app/services/git_operation_service.rb
parente3c36850a618ee2f7f9087b681e62d8a50e7b1b1 (diff)
Rename from base to start because base could mean merge base
Diffstat (limited to 'app/services/git_operation_service.rb')
-rw-r--r--app/services/git_operation_service.rb40
1 files changed, 20 insertions, 20 deletions
diff --git a/app/services/git_operation_service.rb b/app/services/git_operation_service.rb
index ec23407544c..2b2ba0870a4 100644
--- a/app/services/git_operation_service.rb
+++ b/app/services/git_operation_service.rb
@@ -46,23 +46,23 @@ class GitOperationService
end
end
- # Whenever `base_branch_name` is passed, if `branch_name` doesn't exist,
- # it would be created from `base_branch_name`.
- # If `base_project` is passed, and the branch doesn't exist,
- # it would try to find the base from it instead of current repository.
+ # Whenever `start_branch_name` is passed, if `branch_name` doesn't exist,
+ # it would be created from `start_branch_name`.
+ # If `start_project` is passed, and the branch doesn't exist,
+ # it would try to find the commits from it instead of current repository.
def with_branch(
branch_name,
- base_branch_name: nil,
- base_project: repository.project,
+ start_branch_name: nil,
+ start_project: repository.project,
&block)
check_with_branch_arguments!(
- branch_name, base_branch_name, base_project)
+ branch_name, start_branch_name, start_project)
update_branch_with_hooks(branch_name) do
repository.with_repo_branch_commit(
- base_project.repository,
- base_branch_name || branch_name,
+ start_project.repository,
+ start_branch_name || branch_name,
&block)
end
end
@@ -148,27 +148,27 @@ class GitOperationService
end
def check_with_branch_arguments!(
- branch_name, base_branch_name, base_project)
+ branch_name, start_branch_name, start_project)
return if repository.branch_exists?(branch_name)
- if repository.project != base_project
- unless base_branch_name
+ if repository.project != start_project
+ unless start_branch_name
raise ArgumentError,
- 'Should also pass :base_branch_name if' +
- ' :base_project is different from current project'
+ 'Should also pass :start_branch_name if' +
+ ' :start_project is different from current project'
end
- unless base_project.repository.branch_exists?(base_branch_name)
+ unless start_project.repository.branch_exists?(start_branch_name)
raise ArgumentError,
"Cannot find branch #{branch_name} nor" \
- " #{base_branch_name} from" \
- " #{base_project.path_with_namespace}"
+ " #{start_branch_name} from" \
+ " #{start_project.path_with_namespace}"
end
- elsif base_branch_name
- unless repository.branch_exists?(base_branch_name)
+ elsif start_branch_name
+ unless repository.branch_exists?(start_branch_name)
raise ArgumentError,
"Cannot find branch #{branch_name} nor" \
- " #{base_branch_name} from" \
+ " #{start_branch_name} from" \
" #{repository.project.path_with_namespace}"
end
end