Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-04-01 02:39:14 +0300
committerDouwe Maan <douwe@selenight.nl>2017-04-08 22:37:46 +0300
commitb202b42cfee6bb8cf0c142c918c545f45464a29c (patch)
treebcdc1d30a4ec2c11fd4b388cac69a450051943e6 /app/models/legacy_diff_note.rb
parent3d1cade13f61115b63bf6dbda5a1f194ba54b24b (diff)
Link to outdated diff in older MR version from outdated diff discussion
Diffstat (limited to 'app/models/legacy_diff_note.rb')
-rw-r--r--app/models/legacy_diff_note.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/legacy_diff_note.rb b/app/models/legacy_diff_note.rb
index 9a77557ebcd..d7c627432d2 100644
--- a/app/models/legacy_diff_note.rb
+++ b/app/models/legacy_diff_note.rb
@@ -56,11 +56,12 @@ class LegacyDiffNote < Note
#
# If the note's current diff cannot be matched in the MergeRequest's current
# diff, it's considered inactive.
- def active?
+ def active?(diff_refs = nil)
return @active if defined?(@active)
return true if for_commit?
return true unless diff_line
return false unless noteable
+ return false if diff_refs && diff_refs != noteable_diff_refs
noteable_diff = find_noteable_diff