Remove the Project#repo method

This commit is contained in:
Jacob Vosmaer 2018-01-04 18:38:39 +01:00
parent 1e950e3148
commit 176b60d110
2 changed files with 2 additions and 6 deletions

View File

@ -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

View File

@ -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