summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-03-15 07:14:19 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-03-15 07:14:19 +0000
commitdbb0d880a7af993ac767264c14679e55ce25332f (patch)
tree55efbfd8b3f0d89aa57ab99454f4241c16ea8320 /lib
parent78f11a232f53f06779118e8cfcc6d02f8e185482 (diff)
downloadredmine-dbb0d880a7af993ac767264c14679e55ce25332f.tar.gz
redmine-dbb0d880a7af993ac767264c14679e55ce25332f.zip
scm: git: prevent showing trace when repository path changed.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5137 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/scm/adapters/git_adapter.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb
index 7d0a8973f..6d012a7ec 100644
--- a/lib/redmine/scm/adapters/git_adapter.rb
+++ b/lib/redmine/scm/adapters/git_adapter.rb
@@ -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)