500 Error when creating a merge request including submodule deletion
Summary
I'm trying to merge a set of changes which include the deletion of .gitmodules which I have a hunch it's related.
Expected behaviour
Merge request created.
Log excerpt
Completed 500 Internal Server Error in 484ms (ActiveRecord: 7.1ms)
ActionView::Template::Error (undefined method `path' for nil:NilClass):
3: - if diff_file.diff.submodule?
4: %span
5: - submodule_item = project.repository.blob_at(@commit.id, diff_file.file_path)
6: = submodule_link(submodule_item, @commit.id, project.repository)
7: - else
8: %span
9: - if diff_file.deleted_file
app/helpers/submodule_helper.rb:6:in `submodule_links'
app/helpers/diff_helper.rb:157:in `submodule_link'
app/views/projects/diffs/_file.html.haml:6:in `_app_views_projects_diffs__file_html_haml___1653267349141469784_70194922535560'
app/views/projects/diffs/_diffs.html.haml:22:in `block in _app_views_projects_diffs__diffs_html_haml__1830652150926553288_70194905898140'
app/views/projects/diffs/_diffs.html.haml:17:in `each'
app/views/projects/diffs/_diffs.html.haml:17:in `each_with_index'
app/views/projects/diffs/_diffs.html.haml:17:in `_app_views_projects_diffs__diffs_html_haml__1830652150926553288_70194905898140'
app/views/projects/merge_requests/_new_submit.html.haml:37:in `_app_views_projects_merge_requests__new_submit_html_haml___1221975262021238384_70194878935740'
app/views/projects/merge_requests/new.html.haml:5:in `_app_views_projects_merge_requests_new_html_haml___3650664875616120466_70194878630920'
Environment
System information
System: Ubuntu 14.04
Current User: git
Using RVM: no
Ruby Version: 2.1.2p95
Gem Version: 2.2.2
Bundler Version:1.10.6
Rake Version: 10.4.2
Sidekiq Version:3.3.0
GitLab information
Version: 8.1.4
Revision: 295b1f0
Directory: /home/git/gitlab
DB Adapter: mysql2
URL: https://
HTTP Clone URL: https://some-group/some-project.git
SSH Clone URL: git@g:some-group/some-project.git
Using LDAP: yes
Using Omniauth: no
GitLab Shell
Version: 2.6.5
Repositories: /home/git/repositories/
Hooks: /home/git/gitlab-shell/hooks/
Git: /usr/bin/git
Output checks
Checking GitLab Shell ...
GitLab Shell version >= 2.6.5 ? ... OK (2.6.5)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
hooks directories in repos are links: ...
4/2 ... ok
4/3 ... ok
4/4 ... ok
4/6 ... ok
3/7 ... ok
3/8 ... ok
3/9 ... ok
5/10 ... ok
4/11 ... ok
4/12 ... ok
4/15 ... ok
5/16 ... ok
5/17 ... ok
5/18 ... ok
5/19 ... ok
3/20 ... ok
3/21 ... ok
3/22 ... ok
3/23 ... ok
3/24 ... ok
3/25 ... ok
5/27 ... ok
11/28 ... ok
11/29 ... ok
11/30 ... ok
11/31 ... ok
11/32 ... ok
11/33 ... ok
11/34 ... ok
11/35 ... ok
11/36 ... ok
11/37 ... ok
11/38 ... ok
11/39 ... ok
11/40 ... ok
11/41 ... ok
11/42 ... ok
11/43 ... ok
11/44 ... ok
11/45 ... ok
11/46 ... ok
11/47 ... ok
11/48 ... ok
4/50 ... ok
17/51 ... ok
11/52 ... ok
4/53 ... ok
6/55 ... ok
5/56 ... ok
5/58 ... ok
4/60 ... ok
14/61 ... ok
5/65 ... ok
15/67 ... ok
18/68 ... ok
4/69 ... ok
4/70 ... ok
5/71 ... ok
14/72 ... ok
8/73 ... ok
9/74 ... repository is empty
5/76 ... ok
14/78 ... ok
14/80 ... ok
6/82 ... ok
5/83 ... ok
14/84 ... ok
5/85 ... ok
11/86 ... ok
5/87 ... ok
5/89 ... ok
5/90 ... ok
5/91 ... ok
4/92 ... ok
5/93 ... ok
11/95 ... ok
5/96 ... ok
5/97 ... ok
5/98 ... ok
5/99 ... ok
5/100 ... ok
Running /home/git/gitlab-shell/bin/check
Check GitLab API access: OK
Check directories and files:
/home/git/repositories: OK
/home/git/.ssh/authorized_keys: OK
Test redis-cli executable: redis-cli 2.8.4
Send ping to redis server: PONG
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ...
Checking GitLab ...
Checking LDAP ... Finished
Git configured with autocrlf=input? ... yes
Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory setup correctly? ... yes
Init script exists? ... yes
Init script up-to-date? ... yes
projects have namespace: ...
4/2 ... yes
4/3 ... yes
4/4 ... yes
4/6 ... yes
3/7 ... yes
3/8 ... yes
3/9 ... yes
5/10 ... yes
4/11 ... yes
4/12 ... yes
4/15 ... yes
5/16 ... yes
5/17 ... yes
5/18 ... yes
5/19 ... yes
3/20 ... yes
3/21 ... yes
3/22 ... yes
3/23 ... yes
3/24 ... yes
3/25 ... yes
5/27 ... yes
11/28 ... yes
11/29 ... yes
11/30 ... yes
11/31 ... yes
11/32 ... yes
11/33 ... yes
11/34 ... yes
11/35 ... yes
11/36 ... yes
11/37 ... yes
11/38 ... yes
11/39 ... yes
11/40 ... yes
11/41 ... yes
11/42 ... yes
11/43 ... yes
11/44 ... yes
11/45 ... yes
11/46 ... yes
11/47 ... yes
11/48 ... yes
4/50 ... yes
17/51 ... yes
11/52 ... yes
4/53 ... yes
6/55 ... yes
5/56 ... yes
5/58 ... yes
4/60 ... yes
14/61 ... yes
5/65 ... yes
15/67 ... yes
18/68 ... yes
4/69 ... yes
4/70 ... yes
5/71 ... yes
14/72 ... yes
8/73 ... yes
9/74 ... yes
5/76 ... yes
14/78 ... yes
14/80 ... yes
6/82 ... yes
5/83 ... yes
14/84 ... yes
5/85 ... yes
11/86 ... yes
5/87 ... yes
5/89 ... yes
5/90 ... yes
5/91 ... yes
4/92 ... yes
5/93 ... yes
11/95 ... yes
5/96 ... yes
5/97 ... yes
5/98 ... yes
5/99 ... yes
5/100 ... yes
Redis version >= 2.4.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.1.2)
Your git bin path is "/usr/bin/git"
Git version >= 1.7.10 ? ... yes (1.9.1)
Active users: 17
Checking GitLab ... Finished