]> source.dussan.org Git - redmine.git/commitdiff
scm: return nil at model default_branch and override at git model (#8458, #6713).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 30 Jun 2011 03:46:32 +0000 (03:46 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 30 Jun 2011 03:46:32 +0000 (03:46 +0000)
Redmine Git and Mercurial adapter support *branches*.
Mercurial default branch is *dafault*.
But, it is popular to show all revisions on the top page for Mercurial GUI.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6130 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/repository.rb
app/models/repository/git.rb

index cb05000092c8cf840b36240b7302b0065a3fbc3b..21bf1fb5dc607636070ae86bb62f44813c2b801e 100644 (file)
@@ -119,7 +119,7 @@ class Repository < ActiveRecord::Base
   end
 
   def default_branch
-    scm.default_branch
+    nil
   end
 
   def properties(path, identifier=nil)
index 50d2550629a4820e5bdfcf0732cae309604cb353..7d96d002c14f96df7a90230761a68962fc7e4066 100644 (file)
@@ -75,6 +75,10 @@ class Repository::Git < Repository
     scm.tags
   end
 
+  def default_branch
+    scm.default_branch
+  end
+
   def find_changeset_by_name(name)
     return nil if name.nil? || name.empty?
     e = changesets.find(:first, :conditions => ['revision = ?', name.to_s])