We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b590de commit fef3479Copy full SHA for fef3479
modules/git/commit.go
@@ -43,8 +43,9 @@ func (c *Commit) Message() string {
43
}
44
45
// Summary returns first line of commit message.
46
+// The string is forced to be valid UTF8
47
func (c *Commit) Summary() string {
- return strings.Split(strings.TrimSpace(c.CommitMessage), "\n")[0]
48
+ return strings.ToValidUTF8(strings.Split(strings.TrimSpace(c.CommitMessage), "\n")[0], "?")
49
50
51
// ParentID returns oid of n-th parent (0-based index).
0 commit comments