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>2016-12-08 12:08:25 +0300
committerLin Jen-Shin <godfat@godfat.org>2016-12-08 12:08:25 +0300
commit3fa3fcd7876262bb63966debd04d16ea219fad73 (patch)
tree8ccb4823ba9d9a47e8ee7d6514c274c223288f80 /app/services/git_operation_service.rb
parent691f1c496834078ba41209597558259d20790a0b (diff)
Cleanup parameters, easier to understand and
more consistent across different methodst
Diffstat (limited to 'app/services/git_operation_service.rb')
-rw-r--r--app/services/git_operation_service.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/app/services/git_operation_service.rb b/app/services/git_operation_service.rb
index 3a102a9276b..c8504ecf3cd 100644
--- a/app/services/git_operation_service.rb
+++ b/app/services/git_operation_service.rb
@@ -25,23 +25,23 @@ GitOperationService = Struct.new(:user, :repository) do
end
end
- # Whenever `source_branch` is passed, if `branch` doesn't exist,
- # it would be created from `source_branch`.
+ # Whenever `source_branch_name` is passed, if `branch_name` doesn't exist,
+ # it would be created from `source_branch_name`.
# If `source_project` is passed, and the branch doesn't exist,
# it would try to find the source from it instead of current repository.
def with_branch(
branch_name,
- source_branch: nil,
+ source_branch_name: nil,
source_project: repository.project)
- check_with_branch_arguments!(branch_name, source_branch, source_project)
+ check_with_branch_arguments!(
+ branch_name, source_branch_name, source_project)
- update_branch_with_hooks(
- branch_name, source_branch, source_project) do |ref|
+ update_branch_with_hooks(branch_name) do |ref|
if repository.project != source_project
repository.fetch_ref(
source_project.repository.path_to_repo,
- "#{Gitlab::Git::BRANCH_REF_PREFIX}#{source_branch}",
+ "#{Gitlab::Git::BRANCH_REF_PREFIX}#{source_branch_name}",
"#{Gitlab::Git::BRANCH_REF_PREFIX}#{branch_name}"
)
end
@@ -52,7 +52,7 @@ GitOperationService = Struct.new(:user, :repository) do
private
- def update_branch_with_hooks(branch_name, source_branch, source_project)
+ def update_branch_with_hooks(branch_name)
update_autocrlf_option
ref = Gitlab::Git::BRANCH_REF_PREFIX + branch_name