diff --git a/lib/commit_ext.rb b/lib/commit_ext.rb index 91a4c059b02ecc8d09eef05644275334f17f2f4a..0e0459118438007dda6814e76ef829bfdcf0f73b 100644 --- a/lib/commit_ext.rb +++ b/lib/commit_ext.rb @@ -3,13 +3,7 @@ module CommitExt attr_accessor :refs def safe_message - message.encode("UTF-8", - :invalid => :replace, - :undef => :replace, - :universal_newline => true, - :replace => "") - rescue - "-- invalid encoding for commit message" + message.force_encoding(Encoding::UTF_8) end def created_at