BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
40a6a077
Commit
40a6a077
authored
Dec 19, 2016
by
Sean McGivern
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '25761-fix-blame-500' into 'master'
Fix 500 error for invalid path when visiting blame page Closes #25761 See merge request !8145
parents
051c4944
26c8e0b3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
0 deletions
+12
-0
blame_controller.rb
app/controllers/projects/blame_controller.rb
+3
-0
fix-blame-500.yml
changelogs/unreleased/fix-blame-500.yml
+4
-0
blame_controller_spec.rb
spec/controllers/projects/blame_controller_spec.rb
+5
-0
No files found.
app/controllers/projects/blame_controller.rb
View file @
40a6a077
...
...
@@ -8,6 +8,9 @@ class Projects::BlameController < Projects::ApplicationController
def
show
@blob
=
@repository
.
blob_at
(
@commit
.
id
,
@path
)
return
render_404
unless
@blob
@blame_groups
=
Gitlab
::
Blame
.
new
(
@blob
,
@commit
).
groups
end
end
changelogs/unreleased/fix-blame-500.yml
0 → 100644
View file @
40a6a077
---
title
:
Fix blame 500 error on invalid path.
merge_request
:
25761
author
:
Jeff Stubler
spec/controllers/projects/blame_controller_spec.rb
View file @
40a6a077
...
...
@@ -25,5 +25,10 @@ describe Projects::BlameController do
let
(
:id
)
{
'master/files/ruby/popen.rb'
}
it
{
is_expected
.
to
respond_with
(
:success
)
}
end
context
"invalid file"
do
let
(
:id
)
{
'master/files/ruby/missing_file.rb'
}
it
{
expect
(
response
).
to
have_http_status
(
404
)
}
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment