500 on repo with submodule
Issue:
When viewing the FILES tab of a repository with a submodule (as in, a subfolder which is also a repo) gitlab gives a 500. After the submodule is removed (as in, the .git folder in the subfolder is removed) the repo still gives a 500.
When the history is rewritten so that it never contained the submodule or when the repo is recreated and a new push with files (without git history) the files tab works.
Expected behaviour:
Files tab works with a submodule.
Error logs:
ActionView::Template::Error (wrong number of arguments (0 for 1)):
1: - tree, commit = submodule_links(submodule_item)
2: %tr{ class: "tree-item" }
3: %td.tree-item-file-name
4: = image_tag "submodule.png"
app/models/repository.rb:151:in `method_missing'
app/models/repository.rb:199:in `submodule_url_for'
app/helpers/submodule_helper.rb:6:in `submodule_links'
app/views/projects/tree/_submodule_item.html.haml:1:in `_app_views_projects_tree__submodule_item_html_haml__2324151043748917097_69975539286400'
app/helpers/tree_helper.rb:19:in `render_tree'
app/views/projects/tree/_tree.html.haml:45:in `_app_views_projects_tree__tree_html_haml__1152007227715468439_69975502498580'
app/views/projects/tree/show.html.haml:6:in `_app_views_projects_tree_show_html_haml__1477849525898823284_69975501206400'
app/controllers/projects/tree_controller.rb:6:in `show'
app/controllers/application_controller.rb:57:in `set_current_user_for_thread'
Started GET "/user/repo/tree/master" for 127.0.0.1 at 2014-02-25 09:39:56 +0100
Version info:
System information
System: Ubuntu 12.04
Current User: git
Using RVM: no
Ruby Version: 2.0.0p353
Gem Version: 2.0.14
Bundler Version:1.3.5
Rake Version: 10.1.1
GitLab information
Version: 6.6.0
Revision: 490f99d
Directory: /home/git/gitlab
DB Adapter: mysql2
URL: https://lab.example.eu
HTTP Clone URL: https://lab.example.eu/some-project.git
SSH Clone URL: git@lab.example.eu:some-project.git
Using LDAP: yes
Using Omniauth: no
GitLab Shell
Version: 1.8.0
Repositories: /home/git/repositories/
Hooks: /home/git/gitlab-shell/hooks/
Git: /usr/bin/git