We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
[x]
Issue with paging on /repos/{owner}/{repo}/git/trees/{sha} api, any page other than page 1 that should returns items throws an error 500
Reproduced with super simple repo with only 2 items:
works as expected: http://localhost:3000/api/v1/repos/balbright2/awesomecode/git/trees/master?recursive=true&per_page=1&page=1
throws error 500: http://localhost:3000/api/v1/repos/balbright2/awesomecode/git/trees/master?recursive=true&per_page=1&page=2
Log snippet above ...
The text was updated successfully, but these errors were encountered:
I intend to submit a PR for this issue when I can fix it. This was actually found by an Unfolding Word developer https://github.com/unfoldingWord.
Sorry, something went wrong.
Fixed by #9459
No branches or pull requests
[x]
):2019/12/20 22:25:14 ...les/context/panic.go:35:1() [E] PANIC:: runtime error: index out of range
E:/Go/src/runtime/panic.go:44 (0x42fbc1)
panicindex: panic(indexError)
E:/dev/Go/src/code.gitea.io/gitea/modules/repofiles/tree.go:82 (0x123b1a5)
GetTreeBySHA: tree.Entries[e].Path = entries[e].Name()
E:/dev/Go/src/code.gitea.io/gitea/routers/api/v1/repo/tree.go:59 (0x143d95c)
GetTree: if tree, err := repofiles.GetTreeBySHA(ctx.Repo.Repository, sha, ctx.QueryInt("page"), ctx.QueryInt("per_page"), ctx.QueryBool("recursive")); err != nil {
Description
Issue with paging on /repos/{owner}/{repo}/git/trees/{sha} api, any page other than page 1 that should returns items throws an error 500
Reproduced with super simple repo with only 2 items:
works as expected:
http://localhost:3000/api/v1/repos/balbright2/awesomecode/git/trees/master?recursive=true&per_page=1&page=1
throws error 500:
http://localhost:3000/api/v1/repos/balbright2/awesomecode/git/trees/master?recursive=true&per_page=1&page=2
Log snippet above
...
The text was updated successfully, but these errors were encountered: