From ed37d8ed91c990cc729a86337ed9f2a202893aab Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 10 Jul 2011 11:08:00 +0000 Subject: [PATCH] scm: git: catch exception in model default_branch() (#8458, #6713). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6220 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/repository/git.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/models/repository/git.rb b/app/models/repository/git.rb index 7d96d002c..4ad8b6a16 100644 --- a/app/models/repository/git.rb +++ b/app/models/repository/git.rb @@ -77,6 +77,9 @@ class Repository::Git < Repository def default_branch scm.default_branch + rescue Exception => e + logger.error "git: error during get default branch: #{e.message}" + nil end def find_changeset_by_name(name) -- 2.39.5