Project.repository should never be nil so you can call repository.exists? or repository.empty?
Also specify separate project factory for project with filled repo
This commit is contained in:
parent
49b024f5f5
commit
541d899410
13 changed files with 51 additions and 54 deletions
|
@ -187,7 +187,7 @@ module Gitlab
|
|||
|
||||
def reference_commit(identifier)
|
||||
if @project.valid_repo? && commit = @project.repository.commit(identifier)
|
||||
link_to(identifier, project_commit_url(@project, commit), html_options.merge(title: CommitDecorator.new(commit).link_title, class: "gfm gfm-commit #{html_options[:class]}"))
|
||||
link_to(identifier, project_commit_url(@project, commit), html_options.merge(title: commit.link_title, class: "gfm gfm-commit #{html_options[:class]}"))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue