-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Number of commits not counted correctly #4424
Comments
Do you have a git repository we can test on? Have you tried using the latest version of Gitea? I just compiled the version you have and tested it, I can't seem to reproduce. |
Can you give steps on how did you pushed these commits? (ssh or https etc). Do you have any warnings/errors in gitea.log at that time. Commit count are cached for 24 hours if I remember correctly but cache should invalidate on git push/pr merge etc. |
@johanhugg I have used the release at https://github.com/go-gitea/gitea/releases/latest as binary, but not the v1.5.0-rc1 pre-relase, as we are using gitea in production. Sorry, I can't make that gitea install available online due to our firewall. @lafriks The commits where pushed via ssh using password authentication. No warnings or errors are written to gitea.log when pushing or when viewing the commit count. I noticed that only some commits are not counted - in other repos on that install, there are ten commits but the counter shows only seven. However, all commits where pushed from the same remote. The partition is not mounted with "noexec", so #1231 does not seem to apply here. |
@lafriks Now I see that the commit counter at the repo pictured in the screenshot has updated to three, which is correct. There have been more than 24 hours since the commits where made and pushed. No further pushes have been made to the repo in the meantime. Could there be a problem clearing the cache on push/merge? |
I ran into the same issue as well. Same setup (gitea on sqlite, version 1.4.3, amd64-linux); repository being https://neueland.iserlohn-fortress.net/gitea/aqua/smolbote. The repository is a converted mercurial repo. Rerunning the gitea instance fixed the commit count. Creating an empty repository however, and pushing a couple of commits to it properly updates the commit count. (This was done after rerunning the instance.) Edit: Pushing again to the original repository doesn't update the commit count (gitea says 384; git rev-list --count --all says 385), but pushing to the test repo properly updates (2 -> 3 commits), Edit: I also noticed that this repository wasn't getting its pushes listed in the dashboard, and no size listed in the user settings. I had manually reset it previously (deleted it, then git init --bare), which I suppose has broken its gitea integration. Remaking the repository from the gitea UI and pushing it back up fixed the issue. |
Thanks @xiannox, rerunning the gitea instance fixed the commit counter for our problem as well, as far at least for now. If there is no other solution, setting cronjob to regularly restart the instance could be an option, but I still hope someone can help finding another way. |
@bkroll no need to restart. It is cached for 20hours so it will show correct after that anyway. You can also set smaller cache time in app.ini |
Thanks @lafriks, I have set Is it normal that on ssh push to a gitea repo, no log is written to gitea.log with |
Check logs if there are any warnings or errors |
Thanks @lafriks I watched gitea.log, http.log and xorm.log while I did the following:
Commits are now counted correctly, since I deactivated caching.
I tried the same steps on try.gitea.org. There, everything worked as expected. On my machine, I am running SLES 12 SP3 with git 2.12.3 on sqlite db. |
Do you have SELinux enabled in enforced mode? |
Check /var/log/audit.log if there is anything about gitea 3000 port |
SELinux is not enabled, /var/log/audit/ is empty. I looked into /var/log/messages, there are only Macaron log lines in there, but no errors. |
I can also confirm, fresh install of 1.5.0 of Gitea. The only thing I did was create a mirrored repo from GitHub, after the automatic sync has pulled in a few commits I noticed that the commit count is never updated. A restart of the Gitea instance fixed the count. |
@SoulSeekkor There is a fix for mirrored repos already at #4720 |
@adelowo Perfect, thank you! |
@adelowo The issue occured in a regular repo, not a mirrored one. |
I have only observed this kind of behavior when pushing via read/write deploy key, which is already reported a while ago in #3795 |
This happens to me whenever I push from terminal. Doesn't matter if over SSH or HTTPS. It looks like the commit never happened. The only way to see the new commit is to go to the correct branch and check commits. |
@Akito13 what version are you using? |
1.6.0+rc1-123-g3379141d8 Though, I have to clarify: I actually don't care if the commits are counted incorrectly. That's not my problem. And I didn't notice any incorrect counts. I didn't really check it for all repositories, just one and there the count was correct. So I ignored that. But it bothers me, that I can't see pushes on the Dashboard or Public Activity if they are executed from a client in the terminal.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
This bug is still not resolved, please do not close. |
I still cannot replicate this on a regular repository through |
You can check the steps to reproduce of #5058, it's easy. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
Ok I'm gonna close this as fixed by #5935 |
[x]
):Description
The number of commits is not counted correctly. as it can be seen from the screenshot. There are three commits, but it says "1 Commits" on the repository pages.
Also, the uncounted commits are not shown on the user's public activity list on their profile.
What could be done to have the repositories show the correct commit counts?
Screenshots
The text was updated successfully, but these errors were encountered: