summaryrefslogtreecommitdiff
path: root/app/controllers/projects
diff options
context:
space:
mode:
authorRubén Dávila <rdavila84@gmail.com>2016-01-12 19:28:31 -0500
committerRubén Dávila <rdavila84@gmail.com>2016-01-12 19:28:31 -0500
commit7307fa48e70a9fb42902c8a84479d4cf669640aa (patch)
treed290dc481e7685ebd3236fc7c772561ec9efa52a /app/controllers/projects
parentf547e733d1f8acf2c8ae82835b91ae166cf95b16 (diff)
downloadgitlab-ce-7307fa48e70a9fb42902c8a84479d4cf669640aa.tar.gz
Fix broken specs. #3945
Diffstat (limited to 'app/controllers/projects')
-rw-r--r--app/controllers/projects/merge_requests_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb
index b70533ef7be..95fd62b8ace 100644
--- a/app/controllers/projects/merge_requests_controller.rb
+++ b/app/controllers/projects/merge_requests_controller.rb
@@ -104,7 +104,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@commit = @merge_request.last_commit
@first_commit = @merge_request.first_commit
@diffs = @merge_request.compare_diffs
- @diff_refs = [@merge_request.target_sha, @merge_request.source_sha]
+ # We need to use #source_branch because #source_sha requires an existent MergeRequestDiff object.
+ @diff_refs = [@merge_request.target_sha, @merge_request.source_branch]
@ci_commit = @merge_request.ci_commit
@statuses = @ci_commit.statuses if @ci_commit