diff options
author | Dominik Sander <git@dsander.de> | 2015-04-03 16:46:23 +0200 |
---|---|---|
committer | Dominik Sander <git@dsander.de> | 2015-04-15 18:23:57 +0200 |
commit | d4fec49abc0fceec11f970c0699dfe71ee185290 (patch) | |
tree | ce687bb7745e08199f4592640e05c0b56d33de1b /app/helpers | |
parent | 5f78601c8a67028f246134d325cca99952ba78b6 (diff) | |
download | gitlab-ce-d4fec49abc0fceec11f970c0699dfe71ee185290.tar.gz |
Fix merge request comments on files with multiple commits
Having a merge request with a comments on a line which is then changed
in a later commit prevented new comments from properly showing up in the
merge request show page.
* `Note#set_diff` do not use stored the diff when creating a new note
in merge requests (we can not be sure the diff did not changed since
the last comment on that line)
* Do not rely just on `outdated?` of the first note when displaying
comments of a MR in the discussion tab, but partition the
active/outdated notes and display them all
* In the inline changes tab just select the active notes, so an
outdated note does not prevent an active one from being rendered
* Just show active comments in the side-by-side changes tab
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/diff_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/diff_helper.rb b/app/helpers/diff_helper.rb index b56f21c7a18..4f42972a4dd 100644 --- a/app/helpers/diff_helper.rb +++ b/app/helpers/diff_helper.rb @@ -101,7 +101,7 @@ module DiffHelper end def line_comments - @line_comments ||= @line_notes.group_by(&:line_code) + @line_comments ||= @line_notes.select(&:active?).group_by(&:line_code) end def organize_comments(type_left, type_right, line_code_left, line_code_right) |