gitlabhq/lib/commit_ext.rb
2011-10-31 22:57:16 +02:00

16 lines
333 B
Ruby

module CommitExt
def safe_message
message.encode("UTF-8",
:invalid => :replace,
:undef => :replace,
:universal_newline => true,
:replace => "")
rescue
"-- invalid encoding for commit message"
end
def created_at
committed_date
end
end