提交 3a9e5a93 编写于 作者: D Dmitriy Zaporozhets

Show current commit id in branch/tag select

上级 98f040a5
......@@ -52,6 +52,13 @@ module ApplicationHelper
[ "Tag", @project.tags ]
]
# If reference is commit id -
# we should add it to branch/tag selectbox
if(@ref && !options.include?(@ref) &&
@ref =~ /^[0-9a-zA-Z]{6,52}$/)
options << ["Commit", [@ref]]
end
grouped_options_for_select(options, @ref || @project.default_branch)
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册