summaryrefslogtreecommitdiff
path: root/app/controllers/concerns
diff options
context:
space:
mode:
authorAdam Niedzielski <adamsunday@gmail.com>2016-11-10 18:24:12 +0100
committerAdam Niedzielski <adamsunday@gmail.com>2016-11-10 18:24:12 +0100
commit3fa265d19547669c60788e38e389fa12bb119235 (patch)
treee796b5286824892269c836cb75ce11a479a6472a /app/controllers/concerns
parente3dcd83d4a4b75dc050592ea008dc34ecbe0aa49 (diff)
downloadgitlab-ce-3fa265d19547669c60788e38e389fa12bb119235.tar.gz
Fix expanding a collapsed diff when converting a symlink to a regular fileadam-fix-collapsed-diff-symlink-file-conversion
In this case comparing old_path and new_path is not enough because there are two entires that match.
Diffstat (limited to 'app/controllers/concerns')
-rw-r--r--app/controllers/concerns/diff_for_path.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/concerns/diff_for_path.rb b/app/controllers/concerns/diff_for_path.rb
index aeec3009f15..1efa9fe060f 100644
--- a/app/controllers/concerns/diff_for_path.rb
+++ b/app/controllers/concerns/diff_for_path.rb
@@ -3,7 +3,7 @@ module DiffForPath
def render_diff_for_path(diffs)
diff_file = diffs.diff_files.find do |diff|
- diff.old_path == params[:old_path] && diff.new_path == params[:new_path]
+ diff.file_identifier == params[:file_identifier]
end
return render_404 unless diff_file