]> source.dussan.org Git - redmine.git/commitdiff
scm: git: prevent showing trace when repository path changed.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 15 Mar 2011 07:14:19 +0000 (07:14 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 15 Mar 2011 07:14:19 +0000 (07:14 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5137 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/scm/adapters/git_adapter.rb

index 7d0a8973f93a99dd8daa65d24fa24a1a3e0adf73..6d012a7ec74eeb4a73a73f99bcdd3d3d694266b7 100644 (file)
@@ -101,7 +101,9 @@ module Redmine
         end
 
         def default_branch
-          branches.include?('master') ? 'master' : branches.first
+          bras = self.branches
+          return if bras.nil?
+          bras.include?('master') ? 'master' : bras.first
         end
 
         def entries(path=nil, identifier=nil)