Commit 176b60d1 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Remove the Project#repo method

parent 1e950e31
......@@ -353,7 +353,7 @@ class ProjectsController < Projects::ApplicationController
end
def repo_exists?
project.repository_exists? && !project.empty_repo? && project.repo
project.repository_exists? && !project.empty_repo?
rescue Gitlab::Git::Repository::NoRepository
project.repository.expire_exists_cache
......
......@@ -992,10 +992,6 @@ class Project < ActiveRecord::Base
false
end
def repo
repository.rugged
end
def url_to_repo
gitlab_shell.url_to_repo(full_path)
end
......@@ -1438,7 +1434,7 @@ class Project < ActiveRecord::Base
# We'd need to keep track of project full path otherwise directory tree
# created with hashed storage enabled cannot be usefully imported using
# the import rake task.
repo.config['gitlab.fullpath'] = gl_full_path
repository.rugged.config['gitlab.fullpath'] = gl_full_path
rescue Gitlab::Git::Repository::NoRepository => e
Rails.logger.error("Error writing to .git/config for project #{full_path} (#{id}): #{e.message}.")
nil
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment