-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
slice bounds out of range in function: /modules/git.newSignatureFromCommitline #28840
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
Comments
Want to confirm:
|
|
So only gogit version has this issue. Thanks for your test.
OK
Not sure. Maybe caused by some special tags in this repo, like #28843 (comment) |
Replace go-gitea#28849. Thanks to @yp05327 for the looking into the problem. Fix go-gitea#28840 The old behavior of newSignatureFromCommitline is not right. The new parseSignatureFromCommitLine: 1. never fails 2. only accept one format (if there is any other, it could be easily added) And add some tests.
Replace go-gitea#28849. Thanks to @yp05327 for the looking into the problem. Fix go-gitea#28840 The old behavior of newSignatureFromCommitline is not right. The new parseSignatureFromCommitLine: 1. never fails 2. only accept one format (if there is any other, it could be easily added) And add some tests.
Replace go-gitea#28849. Thanks to @yp05327 for the looking into the problem. Fix go-gitea#28840 The old behavior of newSignatureFromCommitline is not right. The new parseSignatureFromCommitLine: 1. never fails 2. only accept one format (if there is any other, it could be easily added) And add some tests. (cherry picked from commit a24e1da)
Automatically locked because of our CONTRIBUTING guidelines |
Description
create a mirror from linux kernel repo, it clone the repo to disk successful but prompt "panic: runtime error: slice bounds out of range [:-1]" on the web. then i use cmd: gitea.exe admin repo-sync-releases, it show below log:
2024/01/18 15:02:39 .../setting/security.go:168:loadSecurityFrom() [W] Enabling Query API Auth tokens is not recommended. DISABLE_QUERY_AUTH_TOKEN will default to true in gitea 1.23 and will be removed in gitea 1.24.
panic: runtime error: slice bounds out of range [:-1]
goroutine 1 [running]:
code.gitea.io/gitea/modules/git.newSignatureFromCommitline({0xc001ebacb8, 0x0, 0x20})
/source/modules/git/signature_gogit.go:37 +0x3fa
code.gitea.io/gitea/modules/git.parseTagRef(0xc001ebafd8?)
/source/modules/git/repo_tag.go:184 +0x22f
code.gitea.io/gitea/modules/git.(*Repository).GetTagInfos(0xc001cba1e0, 0x0, 0x3a071c5?)
/source/modules/git/repo_tag.go:142 +0x7fc
code.gitea.io/gitea/modules/repository.pullMirrorReleaseSync({0x4b4c9f0, 0xc000d4bcc0}, 0xc0020c6800, 0x27?)
/source/modules/repository/repo.go:502 +0x114
code.gitea.io/gitea/modules/repository.SyncReleasesWithTags({0x4b4c9f0?, 0xc000d4bcc0}, 0xc0020c6800, 0xc001cba1e0)
/source/modules/repository/repo.go:294 +0x18a
code.gitea.io/gitea/cmd.runRepoSyncReleases(0xc00045d720?)
/source/cmd/admin.go:392 +0x5ca
code.gitea.io/gitea/cmd.prepareSubcommandWithConfig.prepareWorkPathAndCustomConf.func1(0x2f16c00?)
/source/cmd/main.go:117 +0x1ec
github.com/urfave/cli/v2.(*Command).Run(0x2f16c00, 0xc000ebd380, {0xc0001260e0, 0x1, 0x1})
/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:274 +0x998
github.com/urfave/cli/v2.(*Command).Run(0x2f18d00, 0xc000ebd080, {0xc0001eb200, 0x2, 0x2})
/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:267 +0xbe5
github.com/urfave/cli/v2.(*Command).Run(0xc001bf78c0, 0xc000ebcdc0, {0xc000194140, 0x3, 0x4})
/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:267 +0xbe5
github.com/urfave/cli/v2.(*App).RunContext(0xc0009683c0, {0x4b4c780?, 0x6960640}, {0xc000194140, 0x3, 0x4})
/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:332 +0x5b7
github.com/urfave/cli/v2.(*App).Run(...)
/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:309
code.gitea.io/gitea/cmd.RunMainApp(0xc0009683c0, {0xc000194140?, 0xc0020530e0?, 0x4a?})
/source/cmd/main.go:176 +0x39
main.main()
/source/main.go:46 +0x79
Gitea Version
1.21.4
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
v1.21.4 is downloaded from github release,and used in win11x64
Database
SQLite
The text was updated successfully, but these errors were encountered: