Don't use self when looking for cross-references!

This commit is contained in:
Rubén Dávila 2016-02-16 18:06:56 -05:00 committed by Robert Speicher
parent 169070ba4b
commit 28aaef24ad

View file

@ -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) }