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
This commit is contained in:
Toshi MARUYAMA 2011-07-10 11:08:00 +00:00
parent 7dcdd2f171
commit ed37d8ed91
1 changed files with 3 additions and 0 deletions

View File

@ -77,6 +77,9 @@ class Repository::Git < Repository
def default_branch def default_branch
scm.default_branch scm.default_branch
rescue Exception => e
logger.error "git: error during get default branch: #{e.message}"
nil
end end
def find_changeset_by_name(name) def find_changeset_by_name(name)