[#19] fixed commit reference
This commit is contained in:
parent
923f06cc10
commit
a22be98f9b
|
@ -189,9 +189,10 @@ module Modules
|
||||||
|
|
||||||
def reference_commit(identifier)
|
def reference_commit(identifier)
|
||||||
if commit = @project.repo.commit(identifier)
|
if commit = @project.repo.commit(identifier)
|
||||||
link_to shortest_hash_id(@commit.id), commit_path(@project, @commit.id)
|
link_to shortest_hash_id(commit.id), commit_path(@project, commit.id)
|
||||||
title = GitPresenters::CommitAsMessagePresenter.present(commit, :project => @project).caption
|
title = GitPresenters::CommitAsMessagePresenter.present(commit, :project => @project) do |presenter|
|
||||||
link_to(identifier, commit_path(@project, commit), html_options.merge(title: title, class: "gfm gfm-commit #{html_options[:class]}"))
|
link_to(identifier, commit_path(@project, commit), html_options.merge(title: presenter.caption, class: "gfm gfm-commit #{html_options[:class]}"))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue