From 40ac2ebc2129905cc0831f824dc1c6dc824efc90 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 20 Feb 2012 10:38:03 +0200 Subject: [PATCH] fixed bug with branch/commit detection in select --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 0d435059fcb..aec3dd5145a 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -54,7 +54,7 @@ module ApplicationHelper # If reference is commit id - # we should add it to branch/tag selectbox - if(@ref && !options.include?(@ref) && + if(@ref && !options.flatten.include?(@ref) && @ref =~ /^[0-9a-zA-Z]{6,52}$/) options << ["Commit", [@ref]] end -- GitLab