diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-27 18:08:16 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-27 18:08:16 +0300 |
commit | fb73ca3398c2ac49a616ab553e117b0586089702 (patch) | |
tree | c2f787ac97df38569c59cd0e967331ec1ead6d7e /app/models/repository.rb | |
parent | b6b8f7dc871e73f29af55f06a773136a7242df57 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r-- | app/models/repository.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 2a67c26d840..3ec7d78d5f7 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -95,7 +95,7 @@ class Repository def path_to_repo @path_to_repo ||= begin - storage = Gitlab.config.repositories.storages[@project.repository_storage] + storage = Gitlab.config.repositories.storages[project.repository_storage] File.expand_path( File.join(storage.legacy_disk_path, disk_path + '.git') @@ -128,7 +128,7 @@ class Repository commits = Gitlab::Git::Commit.batch_by_oid(raw_repository, oids) if commits.present? - Commit.decorate(commits, @project) + Commit.decorate(commits, project) else [] end @@ -159,14 +159,14 @@ class Repository } commits = Gitlab::Git::Commit.where(options) - commits = Commit.decorate(commits, @project) if commits.present? + commits = Commit.decorate(commits, project) if commits.present? CommitCollection.new(project, commits, ref) end def commits_between(from, to) commits = Gitlab::Git::Commit.between(raw_repository, from, to) - commits = Commit.decorate(commits, @project) if commits.present? + commits = Commit.decorate(commits, project) if commits.present? commits end @@ -695,13 +695,13 @@ class Repository commits = raw_repository.list_last_commits_for_tree(sha, path, offset: offset, limit: limit) commits.each do |path, commit| - commits[path] = ::Commit.new(commit, @project) + commits[path] = ::Commit.new(commit, project) end end def last_commit_for_path(sha, path) commit = raw_repository.last_commit_for_path(sha, path) - ::Commit.new(commit, @project) if commit + ::Commit.new(commit, project) if commit end def last_commit_id_for_path(sha, path) @@ -1136,7 +1136,7 @@ class Repository Gitlab::Git::Commit.find(raw_repository, oid_or_ref) end - ::Commit.new(commit, @project) if commit + ::Commit.new(commit, project) if commit end def cache |