Show current commit id in branch/tag select
This commit is contained in:
parent
98f040a56f
commit
3a9e5a9357
1 changed files with 7 additions and 0 deletions
|
@ -52,6 +52,13 @@ module ApplicationHelper
|
||||||
[ "Tag", @project.tags ]
|
[ "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)
|
grouped_options_for_select(options, @ref || @project.default_branch)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue