From ca9702088f2c5cec86d99f9c4fe019dccc2bd637 Mon Sep 17 00:00:00 2001 From: Bart Kamphorst Date: Tue, 27 Nov 2018 12:20:56 +0100 Subject: [PATCH] Do not attempt to normalize images or binary files. --- lib/gollum/app.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/gollum/app.rb b/lib/gollum/app.rb index ae477226..f999bf66 100644 --- a/lib/gollum/app.rb +++ b/lib/gollum/app.rb @@ -227,9 +227,11 @@ module Precious options.merge! author end + normalize = !(Gollum::File.image?(fullname) || Gollum::File.binary?(fullname)) + begin committer = Gollum::Committer.new(wiki, options) - committer.add_to_index(dir, filename, format, contents) + committer.add_to_index(dir, filename, format, contents, {normalize: normalize}) committer.after_commit do |committer, sha| wiki.clear_cache committer.update_working_dir(dir, filename, format)