From 26bdeb2107d7d55aa89132d9c060421bd377c9f0 Mon Sep 17 00:00:00 2001 From: Saito Date: Fri, 18 Nov 2011 10:55:08 +0800 Subject: [PATCH] commit safe_commit --- lib/commit_ext.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/commit_ext.rb b/lib/commit_ext.rb index 91a4c059..0e045911 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