Skip to content
Snippets Groups Projects
Commit 3a9e5a93 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Show current commit id in branch/tag select

parent 98f040a5
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment