summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2017-11-07 15:40:13 +0100
committerJames Lopez <james@jameslopez.es>2017-11-07 15:40:13 +0100
commit9a0acc98aafaa315317b799c6a2a0a2fe5ded52e (patch)
tree407e5b21bce006868d4de186d9e0f8b386e4e8d6
parentc93dab478f37dec6934bc61fb1a3d68a00fa8509 (diff)
downloadgitlab-ce-fix/import-export-arguments.tar.gz
-rw-r--r--lib/gitlab/import_export/merge_request_parser.rb2
-rw-r--r--spec/lib/gitlab/import_export/merge_request_parser_spec.rb6
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/import_export/merge_request_parser.rb b/lib/gitlab/import_export/merge_request_parser.rb
index 3e842cd2919..61db4bd9ccc 100644
--- a/lib/gitlab/import_export/merge_request_parser.rb
+++ b/lib/gitlab/import_export/merge_request_parser.rb
@@ -26,7 +26,7 @@ module Gitlab
end
def fetch_ref
- @project.repository.fetch_ref(@project.repository.path, source_ref: @diff_head_sha, target_ref: @merge_request.source_branch)
+ @project.repository.fetch_ref(@project.repository, source_ref: @diff_head_sha, target_ref: @merge_request.source_branch)
end
def branch_exists?(branch_name)
diff --git a/spec/lib/gitlab/import_export/merge_request_parser_spec.rb b/spec/lib/gitlab/import_export/merge_request_parser_spec.rb
index db357f3995c..b793636c4d6 100644
--- a/spec/lib/gitlab/import_export/merge_request_parser_spec.rb
+++ b/spec/lib/gitlab/import_export/merge_request_parser_spec.rb
@@ -31,9 +31,9 @@ describe Gitlab::ImportExport::MergeRequestParser do
end
it 'parses a MR that has no source branch' do
- allow_any_instance_of(Gitlab::ImportExport::MergeRequestParser).to receive(:branch_exists?).and_call_original
- allow_any_instance_of(Gitlab::ImportExport::MergeRequestParser).to receive(:branch_exists?).with(merge_request.source_branch).and_return(false)
- allow_any_instance_of(Gitlab::ImportExport::MergeRequestParser).to receive(:fork_merge_request?).and_return(true)
+ allow_any_instance_of(described_class).to receive(:branch_exists?).and_call_original
+ allow_any_instance_of(described_class).to receive(:branch_exists?).with(merge_request.source_branch).and_return(false)
+ allow_any_instance_of(described_class).to receive(:fork_merge_request?).and_return(true)
allow(Gitlab::GitalyClient).to receive(:migrate).and_call_original
allow(Gitlab::GitalyClient).to receive(:migrate).with(:fetch_ref).and_return([nil, 0])