summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
authorRubén Dávila <rdavila84@gmail.com>2016-02-16 18:06:56 -0500
committerRobert Speicher <rspeicher@gmail.com>2016-02-19 13:14:55 -0500
commit28aaef24adba2b39e0744d888b0e02c7bdb95c0b (patch)
tree76d68d9e86766deca158f4dbc5510c5f66ea15fe /app/models/commit.rb
parent169070ba4b83b1cbb4084abcf8ffeb9f492fcffa (diff)
downloadgitlab-ce-28aaef24adba2b39e0744d888b0e02c7bdb95c0b.tar.gz
Don't use `self` when looking for cross-references!
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index e8528782b59..bb997663cf4 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -247,7 +247,7 @@ class Commit
def has_been_reverted?(current_user = nil, noteable = self)
Gitlab::ReferenceExtractor.lazily do
- [self, *noteable.notes].flat_map do |note|
+ noteable.notes.system.flat_map do |note|
note.all_references(current_user).commits
end
end.any? { |commit_ref| commit_ref.reverts_commit?(self) }