summaryrefslogtreecommitdiff
path: root/app/models/suggestion.rb
diff options
context:
space:
mode:
authorOswaldo Ferreira <oswaldo@gitlab.com>2019-02-20 18:20:08 -0300
committerOswaldo Ferreira <oswaldo@gitlab.com>2019-02-26 17:19:17 -0300
commite116fcab4151d61087afae17b6bf6cac58be29fc (patch)
treef641fd7f6fa036f93bcf171ffae370d29e57c5d7 /app/models/suggestion.rb
parent3395eacb57285424b7b8d49bdf836f638af31e8c (diff)
downloadgitlab-ce-e116fcab4151d61087afae17b6bf6cac58be29fc.tar.gz
Always fetch MR latest version when creating suggestions
This is an issue that can only be seen through EE. Further details can be seen on https://gitlab.com/gitlab-org/gitlab-ee/issues/9876. In general we should always use the latest diff version of a file in order to both create and apply suggestions.
Diffstat (limited to 'app/models/suggestion.rb')
-rw-r--r--app/models/suggestion.rb5
1 files changed, 0 insertions, 5 deletions
diff --git a/app/models/suggestion.rb b/app/models/suggestion.rb
index 7eee4fbbe5f..09034646bff 100644
--- a/app/models/suggestion.rb
+++ b/app/models/suggestion.rb
@@ -19,11 +19,6 @@ class Suggestion < ApplicationRecord
position.file_path
end
- def diff_file
- repository = project.repository
- position.diff_file(repository)
- end
-
# For now, suggestions only serve as a way to send patches that
# will change a single line (being able to apply multiple in the same place),
# which explains `from_line` and `to_line` being the same line.