Do not attempt to normalize images or binary files.
This commit is contained in:
+3
-1
@@ -227,9 +227,11 @@ module Precious
|
|||||||
options.merge! author
|
options.merge! author
|
||||||
end
|
end
|
||||||
|
|
||||||
|
normalize = !(Gollum::File.image?(fullname) || Gollum::File.binary?(fullname))
|
||||||
|
|
||||||
begin
|
begin
|
||||||
committer = Gollum::Committer.new(wiki, options)
|
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|
|
committer.after_commit do |committer, sha|
|
||||||
wiki.clear_cache
|
wiki.clear_cache
|
||||||
committer.update_working_dir(dir, filename, format)
|
committer.update_working_dir(dir, filename, format)
|
||||||
|
|||||||
Reference in New Issue
Block a user