diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2018-01-04 18:38:39 +0100 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2018-01-04 18:38:39 +0100 |
commit | 176b60d11055999d56e30b6fe0581fbede2740c4 (patch) | |
tree | a7355709fd0d212076ba3ceefbe4e4018151d895 | |
parent | 1e950e3148d31cb3b242cb21be11e04964c2a037 (diff) | |
download | gitlab-ce-176b60d11055999d56e30b6fe0581fbede2740c4.tar.gz |
Remove the Project#repo method
-rw-r--r-- | app/controllers/projects_controller.rb | 2 | ||||
-rw-r--r-- | app/models/project.rb | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 6f609348402..6f229b08c0c 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -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 diff --git a/app/models/project.rb b/app/models/project.rb index 9c0bbf697e2..4784bbc8a44 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -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 |