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
path: root/lib
diff options
context:
space:
mode:
authormicael.bergeron <micaelbergeron@gmail.com>2017-11-01 17:31:35 +0300
committermicael.bergeron <micaelbergeron@gmail.com>2017-11-03 15:13:11 +0300
commitcd88fa8f80710ec977a85ab8701570073c94f017 (patch)
tree8866f616741d7a3f7f35f6e37b2e01503804b2a2 /lib
parent8c01f3110c8d8601fc16b17850dfa778f1f3d877 (diff)
removed the #ensure_ref_fetched from all controllers
also, I refactored the MergeRequest#fetch_ref method to express the side-effect that this method has. MergeRequest#fetch_ref -> MergeRequest#fetch_ref! Repository#fetch_source_branch -> Repository#fetch_source_branch!
Diffstat (limited to 'lib')
-rw-r--r--lib/github/import.rb1
-rw-r--r--lib/gitlab/git/repository.rb2
2 files changed, 1 insertions, 2 deletions
diff --git a/lib/github/import.rb b/lib/github/import.rb
index 76612799412..13ecf58bd37 100644
--- a/lib/github/import.rb
+++ b/lib/github/import.rb
@@ -161,7 +161,6 @@ module Github
iid: pull_request.iid,
title: pull_request.title,
description: description,
- ref_fetched: true,
source_project: pull_request.source_project,
source_branch: pull_request.source_branch_name,
source_branch_sha: pull_request.source_branch_sha,
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index 4f9eac92d9a..00f19257994 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -1034,7 +1034,7 @@ module Gitlab
delete_refs(tmp_ref) if tmp_ref
end
- def fetch_source_branch(source_repository, source_branch, local_ref)
+ def fetch_source_branch!(source_repository, source_branch, local_ref)
with_repo_branch_commit(source_repository, source_branch) do |commit|
if commit
write_ref(local_ref, commit.sha)