From 1161cf2ec610cb0ceba61c92180566c9786ab059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20D=C3=A1vila?= Date: Wed, 13 Jan 2016 18:01:40 -0500 Subject: Use current commit id if it doesn't have a parent. #3945 --- app/controllers/projects/commit_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/projects/commit_controller.rb') diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index 9bbf4581057..c8f143dd6b4 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] + @diff_refs = [commit.parent_id || commit.id, commit.id] @notes_count = commit.notes.count @statuses = ci_commit.statuses if ci_commit -- cgit v1.2.1