mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-13 00:44:37 +00:00
Backport #37542 Co-authored-by: Nicolas <bircni@icloud.com> --------- Co-authored-by: Nicolas <bircni@icloud.com>
This commit is contained in:
@@ -37,11 +37,7 @@ type CommitSignature struct {
|
||||
|
||||
// Message returns the commit message. Same as retrieving CommitMessage directly.
|
||||
func (c *Commit) Message() string {
|
||||
// FIXME: GIT-COMMIT-MESSAGE-ENCODING: this logic is not right
|
||||
// * When need to use commit message in templates/database, it should be valid UTF-8
|
||||
// * When need to get the original commit message, it should just use "c.CommitMessage"
|
||||
// It's not easy to refactor at the moment, many templates need to be updated and tested
|
||||
return c.CommitMessage
|
||||
return strings.ToValidUTF8(c.CommitMessage, "?")
|
||||
}
|
||||
|
||||
// Summary returns first line of commit message.
|
||||
|
||||
Reference in New Issue
Block a user