Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9807 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
8a491dbae9
commit
f673027bc1
|
@ -87,10 +87,10 @@ class Repository::Git < Repository
|
|||
end
|
||||
|
||||
def find_changeset_by_name(name)
|
||||
return nil if name.nil? || name.empty?
|
||||
e = changesets.find(:first, :conditions => ['revision = ?', name.to_s])
|
||||
return e if e
|
||||
changesets.find(:first, :conditions => ['scmid LIKE ?', "#{name}%"])
|
||||
if name.present?
|
||||
changesets.where(:revision => name.to_s).first ||
|
||||
changesets.where('scmid LIKE ?', "#{name}%").first
|
||||
end
|
||||
end
|
||||
|
||||
def entries(path=nil, identifier=nil)
|
||||
|
|
Loading…
Reference in New Issue