BigW Consortium Gitlab
Fix error 500 when no HEAD is available Steps to reproduce: 1. Create a project with a README 2. In the actual remote, type: `git symbolic-ref HEAD refs/heads/nowhere` 3. Check that HEAD is gone via `git ls-remote .` 4. Go to the projects page and see the Error 500 Error: ``` NoMethodError - undefined method `sha' for nil:NilClass: app/helpers/projects_helper.rb:281:in `readme_cache_key' app/views/projects/_readme.html.haml:10:in `_app_views_projects__readme_html_haml___2036282917939462960_70154565285700' actionview (4.1.11) lib/action_view/template.rb:145:in `block in render' activesupport (4.1.11) lib/active_support/notifications.rb:159:in `block in instrument' activesupport (4.1.11) lib/active_support/notifications/instrumenter.rb:20:in `instrument' activesupport (4.1.11) lib/active_support/notifications.rb:159:in `instrument' actionview (4.1.11) lib/action_view/template.rb:339:in `instrument' actionview (4.1.11) lib/action_view/template.rb:143:in `render' rack-mini-profiler (0.9.0) lib/mini_profiler/profiling_methods.rb:108:in `block in profile_method' actionview (4.1.11) lib/action_view/renderer/partial_renderer.rb:306:in `render_partial' actionview (4.1.11) lib/action_view/renderer/partial_renderer.rb:279:in `block in render' actionview (4.1.11) lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument' activesupport (4.1.11) lib/active_support/notifications.rb:159:in `block in instrument' activesupport (4.1.11) lib/active_support/notifications/instrumenter.rb:20:in `instrument' activesupport (4.1.11) lib/active_support/notifications.rb:159:in `instrument' actionview (4.1.11) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument' actionview (4.1.11) lib/action_view/renderer/partial_renderer.rb:278:in `render' actionview (4.1.11) lib/action_view/renderer/renderer.rb:47:in `render_partial' actionview (4.1.11) lib/action_view/helpers/rendering_helper.rb:35:in `render' haml (4.0.5) lib/haml/helpers/action_view_mods.rb:10:in `block in render_with_haml' haml (4.0.5) lib/haml/helpers.rb:89:in `non_haml' haml (4.0.5) lib/haml/helpers/action_view_mods.rb:10:in `render_with_haml' app/views/projects/show.html.haml:47:in `_app_views_projects_show_html_haml__1458303859692972698_70154948164180' actionview (4.1.11) lib/action_view/template.rb:145:in `block in render' activesupport (4.1.11) lib/active_support/notifications.rb:159:in `block in instrument' ``` Closes https://github.com/gitlabhq/gitlabhq/issues/9484, but there may be some other issue there. See merge request !1041
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
appearances_helper.rb | Loading commit data... | |
application_helper.rb | Loading commit data... | |
application_settings_helper.rb | Loading commit data... | |
auth_helper.rb | Loading commit data... | |
blob_helper.rb | Loading commit data... | |
branches_helper.rb | Loading commit data... | |
broadcast_messages_helper.rb | Loading commit data... | |
commits_helper.rb | Loading commit data... | |
compare_helper.rb | Loading commit data... | |
dashboard_helper.rb | Loading commit data... | |
diff_helper.rb | Loading commit data... | |
emails_helper.rb | Loading commit data... | |
events_helper.rb | Loading commit data... | |
explore_helper.rb | Loading commit data... | |
external_wiki_helper.rb | Loading commit data... | |
git_helper.rb | Loading commit data... | |
gitlab_markdown_helper.rb | Loading commit data... | |
gitlab_routing_helper.rb | Loading commit data... | |
graph_helper.rb | Loading commit data... | |
groups_helper.rb | Loading commit data... | |
icons_helper.rb | Loading commit data... | |
issues_helper.rb | Loading commit data... | |
labels_helper.rb | Loading commit data... | |
merge_requests_helper.rb | Loading commit data... | |
milestones_helper.rb | Loading commit data... | |
namespaces_helper.rb | Loading commit data... | |
nav_helper.rb | Loading commit data... | |
notes_helper.rb | Loading commit data... | |
notifications_helper.rb | Loading commit data... | |
page_layout_helper.rb | Loading commit data... | |
preferences_helper.rb | Loading commit data... | |
projects_helper.rb | Loading commit data... | |
search_helper.rb | Loading commit data... | |
selects_helper.rb | Loading commit data... | |
snippets_helper.rb | Loading commit data... | |
sorting_helper.rb | Loading commit data... | |
submodule_helper.rb | Loading commit data... | |
tab_helper.rb | Loading commit data... | |
tags_helper.rb | Loading commit data... | |
tree_helper.rb | Loading commit data... | |
version_check_helper.rb | Loading commit data... | |
visibility_level_helper.rb | Loading commit data... | |
wiki_helper.rb | Loading commit data... |