Error viewing branches list containing a symbolic reference
Basically we "sort of" support symbolic references now, but there are some places in the code that it fails (sorting branches):
This fails because we don't have a
This breaks anywhere in the UI where we are not just sorting by name. Currently in the UI that the Branches page, the Branches drop down on the repository home page, BUT NOT the merge request creation page, that's sorted by name.
Steps to reproduce
- create repo
- create branch named
- create symbolic ref via command line pointing to test-branch
- Try and load the branches page: /branches
This fails due to not having a dereferenced target:
NoMethodError (undefined method `committed_date' for nil:NilClass): lib/gitlab/git/repository.rb:1982:in `block in sort_branches' lib/gitlab/git/repository.rb:1981:in `sort' lib/gitlab/git/repository.rb:1981:in `sort_branches' lib/gitlab/git/repository.rb:1779:in `branches_filter' lib/gitlab/git/repository.rb:207:in `block in local_branches'