gfm should respect @ref value when build relative links

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-08-06 12:14:53 +03:00
parent e4c6dbe35f
commit e1f141ac1a
No known key found for this signature in database
GPG Key ID: 627C5F589F467F17
1 changed files with 5 additions and 1 deletions

View File

@ -179,7 +179,11 @@ module GitlabMarkdownHelper
if @commit
@commit.id
elsif @repository && !@repository.empty?
@repository.head_commit.sha
if @ref
@repository.commit(@ref).try(:sha)
else
@repository.head_commit.sha
end
end
end