diff options
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r-- | app/models/repository.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 37a20404ae7..c439d0700f1 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -1131,7 +1131,11 @@ class Repository end def project - container + if repo_type.snippet? + container.project + else + container + end end private @@ -1145,7 +1149,7 @@ class Repository Gitlab::Git::Commit.find(raw_repository, oid_or_ref) end - ::Commit.new(commit, project) if commit + ::Commit.new(commit, container) if commit end def cache |