summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-01-12 15:47:50 +0000
committerRémy Coutable <remy@rymai.me>2018-01-12 15:47:50 +0000
commit6438a1afa7f260da3d7de85c4986042bdf56c84e (patch)
tree8cafbac3f0f635ced7c1f3b28b537987ab228355 /app/models/commit.rb
parent3b029de094f58e18b955bf472ccaff93de70d3bd (diff)
parentf3cf8cc8d1625ae1cd532474191739cd36419425 (diff)
downloadgitlab-ce-6438a1afa7f260da3d7de85c4986042bdf56c84e.tar.gz
Merge branch '41807-15665-consistently-502s-because-it-fetches-every-commit' into 'master'41988-updating-the-markdown-cache-version-does-not-flush-the-appearances-cache
Resolve "!15665 consistently 502s because it fetches every commit" Closes #41807 See merge request gitlab-org/gitlab-ce!16320
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 39d7f5b159d..ede8ad301e4 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -342,10 +342,11 @@ class Commit
@merged_merge_request_hash[current_user]
end
- def has_been_reverted?(current_user, noteable = self)
+ def has_been_reverted?(current_user, notes_association = nil)
ext = all_references(current_user)
+ notes_association ||= notes_with_associations
- noteable.notes_with_associations.system.each do |note|
+ notes_association.system.each do |note|
note.all_references(current_user, extractor: ext)
end