500 After Creating New Branch
Created by: MrKeiKun
Summary: My plan was to change the default branch in a project but first what I did was create a Branch, and then after creating a new branch(while it's loading) it returned 500.
Logs:
Started POST "/group/project/branches" for 112.207.96.85 at 2014-02-11 21:00:50 +0800
Processing by Projects::BranchesController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"bllTrYjNm19lWqEMnO7cpsb5+pRiSl1LbEyRkXzQggU=", "branch_name"=>"pre-renewal", "ref"=>"master", "project_id"=>"group/project"}
Completed 500 Internal Server Error in 14306ms
NoMethodError (undefined method `commit' for #<Gitlab::Git::Branch:0xbb555e2c>):
app/models/event.rb:61:in `create_ref_event'
app/controllers/projects/branches_controller.rb:22:in `create'
app/controllers/application_controller.rb:57:in `set_current_user_for_thread'