Skip to content
Snippets Groups Projects
Commit 1161cf2e authored by Rubén Dávila's avatar Rubén Dávila
Browse files

Use current commit id if it doesn't have a parent. #3945

parent 0f0af191
No related branches found
No related tags found
1 merge request!2109Add syntax highlighting to diff view
Loading
@@ -72,7 +72,7 @@ class Projects::CommitController < Projects::ApplicationController
Loading
@@ -72,7 +72,7 @@ class Projects::CommitController < Projects::ApplicationController
@diffs = commit.diffs @diffs = commit.diffs
end end
   
@diff_refs = [commit.parent.id, commit.id] @diff_refs = [commit.parent_id || commit.id, commit.id]
@notes_count = commit.notes.count @notes_count = commit.notes.count
   
@statuses = ci_commit.statuses if ci_commit @statuses = ci_commit.statuses if ci_commit
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment