diff options
-rw-r--r-- | app/helpers/application_helper.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 63216e8f7f0..0d435059fcb 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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 |