commit safe_commit
This commit is contained in:
parent
2a874a00dc
commit
26bdeb2107
1 changed files with 1 additions and 7 deletions
|
@ -3,13 +3,7 @@ module CommitExt
|
||||||
attr_accessor :refs
|
attr_accessor :refs
|
||||||
|
|
||||||
def safe_message
|
def safe_message
|
||||||
message.encode("UTF-8",
|
message.force_encoding(Encoding::UTF_8)
|
||||||
:invalid => :replace,
|
|
||||||
:undef => :replace,
|
|
||||||
:universal_newline => true,
|
|
||||||
:replace => "")
|
|
||||||
rescue
|
|
||||||
"-- invalid encoding for commit message"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def created_at
|
def created_at
|
||||||
|
|
Loading…
Add table
Reference in a new issue