5-1-stable : Error 500 on read MR
Created by: Isammoc
Since 5.1, a 500 error occurs when :
- Dev pushes branch
my_branch
- Dev creates a MR
my_branch
->master
- Dev pushes additional commits on
my_branch
production.log :
Started GET "/test_project/merge_requests/329" for at 2013-05-02 15:08:01 +0200
Processing by MergeRequestsController#show as HTML
Parameters: {"project_id"=>"test_project", "id"=>"329"}
Completed 500 Internal Server Error in 69ms
NoMethodError (undefined method `id' for nil:NilClass):
app/models/commit.rb:24:in `id'
lib/gitlab/git/commit.rb:107:in `init_from_grit'
lib/gitlab/git/commit.rb:21:in `initialize'
app/models/merge_request.rb:213:in `new'
app/models/merge_request.rb:213:in `block in load_commits'
app/models/merge_request.rb:213:in `map'
app/models/merge_request.rb:213:in `load_commits'
app/models/merge_request.rb:145:in `commits'
app/controllers/merge_requests_controller.rb:140:in `define_show_vars'