1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Refactor parseSignatureFromCommitLine (#29054) (#29108)

Backport #29054. Fix #28840

This backport is for 1.21 only and it is different from the change in
1.22: this backport still accept the legacy date format to avoid
breaking.
This commit is contained in:
wxiaoguang
2024-02-09 17:26:43 +08:00
committed by GitHub
parent 1aaeec6da7
commit 732d511e04
8 changed files with 104 additions and 149 deletions

View File

@@ -7,6 +7,8 @@ import (
"bytes"
"sort"
"strings"
"code.gitea.io/gitea/modules/util"
)
const (
@@ -57,11 +59,7 @@ l:
// A commit can have one or more parents
tag.Type = string(line[spacepos+1:])
case "tagger":
sig, err := newSignatureFromCommitline(line[spacepos+1:])
if err != nil {
return nil, err
}
tag.Tagger = sig
tag.Tagger = parseSignatureFromCommitLine(util.UnsafeBytesToString(line[spacepos+1:]))
}
nextline += eol + 1
case eol == 0: