commit safe_commit

This commit is contained in:
Saito 2011-11-18 10:55:08 +08:00
parent 2a874a00dc
commit 26bdeb2107

View file

@ -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