diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-08-04 19:35:47 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-08-04 19:35:47 +0300 |
commit | 8f05fbbab5754b2a05547bae7ed3f9c409d8a640 (patch) | |
tree | 5c07fb3e4ee0cf462b4a03cd329e2b6b213d12bb /app/helpers | |
parent | 2d75b454ef87a87bff942dc31837687919113468 (diff) | |
download | gitlab-ce-8f05fbbab5754b2a05547bae7ed3f9c409d8a640.tar.gz |
Dont show comment on diff if diff line was changed after comment left
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/commits_helper.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb index 111e1cda19c..f808ac764d4 100644 --- a/app/helpers/commits_helper.rb +++ b/app/helpers/commits_helper.rb @@ -38,6 +38,8 @@ module CommitsHelper lines_arr = ::Gitlab::InlineDiff.processing diff_arr lines_arr.each do |line| + raw_line = line.dup + next if line.match(/^\-\-\- \/dev\/null/) next if line.match(/^\+\+\+ \/dev\/null/) next if line.match(/^\-\-\- a/) @@ -58,7 +60,7 @@ module CommitsHelper else type = identification_type(line) line_code = build_line_anchor(diff, line_new, line_old) - yield(full_line, type, line_code, line_new, line_old) + yield(full_line, type, line_code, line_new, line_old, raw_line) end |