Commit 3a9e5a9357b6b0cac2acdefa203136c9b572e102
1 parent
98f040a5
Exists in
master
and in
4 other branches
Show current commit id in branch/tag select
Showing
1 changed file
with
7 additions
and
0 deletions
Show diff stats
app/helpers/application_helper.rb
... | ... | @@ -52,6 +52,13 @@ module ApplicationHelper |
52 | 52 | [ "Tag", @project.tags ] |
53 | 53 | ] |
54 | 54 | |
55 | + # If reference is commit id - | |
56 | + # we should add it to branch/tag selectbox | |
57 | + if(@ref && !options.include?(@ref) && | |
58 | + @ref =~ /^[0-9a-zA-Z]{6,52}$/) | |
59 | + options << ["Commit", [@ref]] | |
60 | + end | |
61 | + | |
55 | 62 | grouped_options_for_select(options, @ref || @project.default_branch) |
56 | 63 | end |
57 | 64 | ... | ... |