summaryrefslogtreecommitdiff
path: root/app/controllers/projects/commit_controller.rb
diff options
context:
space:
mode:
authorRubén Dávila <rdavila84@gmail.com>2016-01-14 16:38:37 -0500
committerRubén Dávila <rdavila84@gmail.com>2016-01-14 16:47:55 -0500
commit6b9c730e91962a6d6343bcb7fc4dc75c99b41bde (patch)
treeb9f7cafa96b131b6039e858e2c2503011551cfd6 /app/controllers/projects/commit_controller.rb
parent70bc322415b33a4789067b81387d30f1411c9091 (diff)
downloadgitlab-ce-6b9c730e91962a6d6343bcb7fc4dc75c99b41bde.tar.gz
More refactoring from last code review. #3945
* Use commit objects instead of IDs when generating diffs * Use proper references when generating MR's source and target * Update broken specs
Diffstat (limited to 'app/controllers/projects/commit_controller.rb')
-rw-r--r--app/controllers/projects/commit_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb
index c8f143dd6b4..ba924ccc5a5 100644
--- a/app/controllers/projects/commit_controller.rb
+++ b/app/controllers/projects/commit_controller.rb
@@ -72,7 +72,7 @@ class Projects::CommitController < Projects::ApplicationController
@diffs = commit.diffs
end
- @diff_refs = [commit.parent_id || commit.id, commit.id]
+ @diff_refs = [commit.parent || commit, commit]
@notes_count = commit.notes.count
@statuses = ci_commit.statuses if ci_commit