gitlabhq/lib/commit_ext.rb

10 lines
275 B
Ruby
Raw Normal View History

2011-10-24 21:38:03 +02:00
module CommitExt
# Cause of encoding rails truncate raise error
# this method is temporary decision
def truncated_message(size = 80)
message.length > size ? (message[0..(size - 1)] + "...") : message
rescue
"-- invalid encoding for commit message"
end
end