Merge pull request #968 from warpc/959-error_with_empty_projects

[refs #959] fix did you run git update-server-info on the server?
This commit is contained in:
Vladimir Sharshov 2013-02-25 06:38:13 -08:00
commit 268b92d063
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ class Projects::Git::TreesController < Projects::Git::BaseController
skip_before_filter :set_branch_and_tree, :set_treeish_and_path, :only => :archive
def show
render('empty') and return if @project.empty?
render('empty') and return if @project.is_empty?
@tree = @tree / @path if @path.present?
@commit = @branch.present? ? @branch.commit() : @project.repo.log(@treeish, @path, :max_count => 1).first
raise Grit::NoSuchPathError unless @commit

View File

@ -97,7 +97,7 @@ module Modules
system("#{Rails.root.join('bin', 'import_srpm.sh')} #{opts} >> /dev/null 2>&1")
end
def empty?
def is_empty?
repo.branches.count == 0
end