From 913b8469fecbebf98a97b6f12eee7aafa5b475c6 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Thu, 31 Jan 2013 23:18:57 +0600 Subject: [PATCH] [refs #878] fix bug with default head --- app/models/project.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/project.rb b/app/models/project.rb index 2f58f40e7..3a697e7af 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -180,7 +180,7 @@ class Project < ActiveRecord::Base def default_head treeish = nil # maybe need change 'head'? if repo.branches_and_tags.map(&:name).include?(treeish || default_branch) - treeish + treeish || default_branch else repo.branches_and_tags[0].try(:name) || 'master' end