Show name changes in diff preview
|Assignee:||Go MAEDA||% Done:|
When previewing uploaded diff/patch files, which contains renames, Redmine will always show the new file name in the diff preview. This can be misleading, since it would not show that the old file was removed.
The attached patch keeps track of the previous file name and shows the additional information in the UI.
!Screen Shot 2018-03-05 at 14.48.00.png!
Please note, this patch was tested with/developed for git's patch files. Also, pure renames (without file modifications) will not be visible -- just like they are today.
#4 Updated by Go MAEDA over 4 years ago
- Status changed from New to Needs feedback
- Assignee set to Gregor Schmidt
RepositoriesGitControllerTest#test_diff_should_show_filenames fails on my environment. Would you look into this?
$ ruby test/functional/repositories_git_controller_test.rb Run options: --seed 19867 # Running: .......F Failure: RepositoriesGitControllerTest#test_diff_should_show_filenames [test/functional/repositories_git_controller_test.rb:432]: <sources/watchers_controller.rb> expected but was <copied_README>.. Expected 0 to be >= 1. /path/to/gems/ruby/2.3.0/gems/railties-5.1.4/lib/rails/test_unit/reporter.rb:70:in `method': undefined method `test_diff_should_show_filenames' for class `Minitest::Result' (NameError) from /path/to/gems/ruby/2.3.0/gems/railties-5.1.4/lib/rails/test_unit/reporter.rb:70:in `format_rerun_snippet'
Rails version 5.1.4 Ruby version 2.3.3-p222 (x86_64-darwin16) RubyGems version 2.6.10 Rack version 2.0.4