summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorMinsik Yoon <yms9654@gmail.com>2015-11-30 18:30:44 +0900
committerMinsik Yoon <yms9654@gmail.com>2015-12-01 09:51:10 +0900
commit8c4a3c77d87e89bf3fd237fef49fc87fb6170d86 (patch)
tree51bb96b58e513daf35052db83650652dc3ac3b01 /app/controllers
parentd73d2a5e5851dd97223705272f05a1e2a87ffb5d (diff)
downloadgitlab-ce-8c4a3c77d87e89bf3fd237fef49fc87fb6170d86.tar.gz
Add ignore whitespace change option to commit view
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/commit_controller.rb7
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