Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor parseSignatureFromCommitLine (#29054) #29108

Merged
merged 2 commits into from
Feb 9, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
still support legacy date format
  • Loading branch information
wxiaoguang committed Feb 9, 2024
commit 8170e4cd51a7dbec7728e1e1176ed245087dc0b9
2 changes: 1 addition & 1 deletion modules/git/signature.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func parseSignatureFromCommitLine(line string) *Signature {
// the old gitea code tried to parse the date in a few different formats, but it's not clear why.
// according to public document, only the standard format "timestamp timezone" could be found, so drop other formats.
log.Error("suspicious commit line format: %q", line)
for _, fmt := range []string{ /*"Mon Jan _2 15:04:05 2006 -0700"*/ } {
for _, fmt := range []string{"Mon Jan _2 15:04:05 2006 -0700"} {
if t, err := time.Parse(fmt, s3); err == nil {
sig.When = t
break
Expand Down
Loading