Ignoring hidden refs when checking for repository emptiness
Created by: bozaro
I use https://github.com/bozaro/git-as-svn project for access to git repositories via svn protocol.
This project create ref git-as-svn/v1/master
for store:
- subversion revision to git commit mapping;
- subversion repository guid.
This ref created event on empty repository.
Before this change GitLab fail on empty project page with error:
ActionController::UrlGenerationError at /root/bar1
No route matches {:action=>"show", :controller=>"projects/commits", :id=>nil, :namespace_id=>#<Namespace id: 1, name: "root", path: "root", owner_id: 1, created_at: "2015-09-26 17:02:43", updated_at: "2015-09-26 17:02:43", type: nil, description: "", avatar: nil>, :project_id=>#<Project id: 11, name: "bar1", path: "bar1", description: "", created_at: "2015-09-27 05:30:51", updated_at: "2015-09-27 05:30:51", creator_id: 1, issues_enabled: true, wall_enabled: false, merge_requests_enabled: true, wiki_enabled: true, namespace_id: 1, issues_tracker: "gitlab", issues_tracker_id: nil, snippets_enabled: false, last_activity_at: "2015-09-27 05:30:51", import_url: "", visibility_level: 10, archived: false, avatar: nil, import_status: "none", repository_size: 0.0, star_count: 0, import_type: nil, import_source: nil, commit_count: 0>} missing required keys: [:id]
After this change it show correct page for empty repository.