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

Get a list of all commits from a repository will lost some file sometimes #30492

Closed
udlenbo opened this issue Apr 15, 2024 · 6 comments · Fixed by #30602
Closed

Get a list of all commits from a repository will lost some file sometimes #30492

udlenbo opened this issue Apr 15, 2024 · 6 comments · Fixed by #30602
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug

Comments

@udlenbo
Copy link

udlenbo commented Apr 15, 2024

Description

gitea version: 1.18.1 or 1.21.1
sometimes, we use "http://xx/api/v1/repos/yourgroup/yourrepo/commits?sha=0710d43a4b4297d3dd7161673b09ac811aa908cb&stat=true&page=1&limit=1" to search, fill will be lost but sometimes it will display.

Gitea Version

1.18.1 or 1.21.1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

use the same url, sometimes a file lost, but sometimes will display.

  • query first
    image

  • query again
    image

Git Version

No response

Operating System

No response

How are you running Gitea?

run from docker

Database

None

@udlenbo
Copy link
Author

udlenbo commented Apr 16, 2024

can someone help me?

@lunny
Copy link
Member

lunny commented Apr 16, 2024

Can you reproduce it on https://try.gitea.io ?

@udlenbo
Copy link
Author

udlenbo commented Apr 17, 2024

Can you reproduce it on https://try.gitea.io ?

Yes
repository url: https://try.gitea.io/udlenbo/commit_miss_file.git

please look at this commit, we can find 22 files were changed
image

but when we use "https://try.gitea.io/api/v1/repos/udlenbo/commit_miss_file/commits?sha=24def873bc58ad90b6be802275fea81e7b97b2ab&stat=true&page=1&limit=1"
there are only 21 files found
image

@lunny lunny added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Apr 18, 2024
@KN4CK3R
Copy link
Member

KN4CK3R commented Apr 19, 2024

With the try link it happens sometimes but I can't reproduce it locally.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Apr 19, 2024

Unable to reproduce either, but I think this will fix: Fix commit file status parser #30602

The result of "ReadSlice" is only valid before next read.

wxiaoguang added a commit that referenced this issue Apr 19, 2024
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Apr 19, 2024
wxiaoguang added a commit that referenced this issue Apr 19, 2024
Backport #30602 by wxiaoguang

Try to fix  #30492

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@wxiaoguang
Copy link
Contributor

The 1.21-nightly is ready, could you try it?

https://hub.docker.com/r/gitea/gitea/tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants