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:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-23 21:06:14 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-23 21:06:14 +0300
commitc792263edfaf826c58f4aa41d26904464a17a3e7 (patch)
treeb57ae96c9eeaf0a1432a29f7f50f2fce9529818d /app/models/diff_note.rb
parent6f9edd1a4c4942d3d13ec54793cfae56164b1a0a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/diff_note.rb')
-rw-r--r--app/models/diff_note.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/diff_note.rb b/app/models/diff_note.rb
index aa7286a9971..65e87bb08a7 100644
--- a/app/models/diff_note.rb
+++ b/app/models/diff_note.rb
@@ -75,6 +75,10 @@ class DiffNote < Note
self.original_position.diff_refs == diff_refs
end
+ # Checks if the current `position` line in the diff
+ # exists and is suggestible (not a deletion).
+ #
+ # Avoid using in iterations as it requests Gitaly.
def supports_suggestion?
return false unless noteable&.supports_suggestion? && on_text?
# We don't want to trigger side-effects of `diff_file` call.