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
path: root/lib
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2018-07-03 11:21:08 +0300
committerSean McGivern <sean@mcgivern.me.uk>2018-07-03 11:21:08 +0300
commita65fec0b0b36879960d92cef337d0f3094a7275a (patch)
tree4c4cf0ff8ed9a7b240fd3b80fb8e781030d70fc5 /lib
parent275fbf24b1810e2fbef92b6599d5372855b97b46 (diff)
parent26a8472d6d0aa1eb40285105a0f55f2f7d439897 (diff)
Merge branch 'jprovazn-extra-line' into 'master'
Don't add bottom 'match' line for deleted files Closes #48160 See merge request gitlab-org/gitlab-ce!20255
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/diff/file.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/diff/file.rb b/lib/gitlab/diff/file.rb
index 40bcfa20e7d..a9e209d5b71 100644
--- a/lib/gitlab/diff/file.rb
+++ b/lib/gitlab/diff/file.rb
@@ -250,7 +250,7 @@ module Gitlab
last_line = lines.last
- if last_line.new_pos < total_blob_lines(blob)
+ if last_line.new_pos < total_blob_lines(blob) && !deleted_file?
match_line = Gitlab::Diff::Line.new("", 'match', nil, last_line.old_pos, last_line.new_pos)
lines.push(match_line)
end