diff options
author | Stan Hu <stanhu@gmail.com> | 2015-12-01 00:30:39 -0800 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-12-01 00:30:39 -0800 |
commit | a518879a6fe606630b225ccfc4f489b3b0d58adf (patch) | |
tree | 3ae854327c49b7ec3814288a1509aa998772f873 /app | |
parent | ceeb93fa77783a3fa9a60529195cd187af191bba (diff) | |
parent | 8c4a3c77d87e89bf3fd237fef49fc87fb6170d86 (diff) | |
download | gitlab-ce-a518879a6fe606630b225ccfc4f489b3b0d58adf.tar.gz |
Merge pull request #9868 from yms9654/commit-without-whitespace
Add ignore whitespace change option to commit view
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects/commit_controller.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index deefdd76667..3f137440e28 100644 --- a/app/controllers/projects/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -67,7 +67,12 @@ class Projects::CommitController < Projects::ApplicationController end def define_show_vars - @diffs = commit.diffs + if params[:w].to_i == 1 + @diffs = commit.diffs({ ignore_whitespace_change: true }) + else + @diffs = commit.diffs + end + @notes_count = commit.notes.count @builds = ci_commit.builds if ci_commit |