commit safe_commit
This commit is contained in:
parent
2a874a00dc
commit
26bdeb2107
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue