mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-12 02:24:21 -05:00
Number of commits not counted correctly #2044
Closed
opened 2025-11-02 04:22:07 -06:00 by GiteaMirror
·
28 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1.16.2
v1.16.1
v1.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v1.3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#2044
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bkroll on GitHub (Jul 11, 2018).
[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
@johanhugg commented on GitHub (Jul 11, 2018):
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.
@lafriks commented on GitHub (Jul 11, 2018):
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.
@bkroll commented on GitHub (Jul 16, 2018):
@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.
@bkroll commented on GitHub (Jul 16, 2018):
@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?
@ghost commented on GitHub (Jul 17, 2018):
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.
@bkroll commented on GitHub (Jul 23, 2018):
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.
@lafriks commented on GitHub (Jul 23, 2018):
@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
@bkroll commented on GitHub (Jul 23, 2018):
Thanks @lafriks, I have set
ITEM_TTL = 0to deactivate caching, which provides a workaround to this problem. But now I have noticed that closing or referencing an issue from the commit message does not work either. Could those two problems be related? (I have checked that thenoexecproblem #1231 is not the case here.)Is it normal that on ssh push to a gitea repo, no log is written to gitea.log with
Debuglog level? I'm not sure the hooks are running properly. Also, I have updated the instance to 1.5.0-rc2, but that did not solve the problems.@lafriks commented on GitHub (Jul 23, 2018):
Check logs if there are any warnings or errors
@bkroll commented on GitHub (Jul 23, 2018):
Thanks @lafriks I watched gitea.log, http.log and xorm.log while I did the following:
close #1to close issue:#1in commit message is linked to issue pageCommits 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.
@lafriks commented on GitHub (Jul 23, 2018):
Do you have SELinux enabled in enforced mode?
@lafriks commented on GitHub (Jul 23, 2018):
Check /var/log/audit.log if there is anything about gitea 3000 port
@bkroll commented on GitHub (Jul 24, 2018):
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.
@SoulSeekkor commented on GitHub (Aug 21, 2018):
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.
@adelowo commented on GitHub (Aug 21, 2018):
@SoulSeekkor There is a fix for mirrored repos already at https://github.com/go-gitea/gitea/pull/4720
@bkroll is this issue on a mirrored repo too or a regular one ?
@SoulSeekkor commented on GitHub (Aug 22, 2018):
@adelowo Perfect, thank you!
@bkroll commented on GitHub (Sep 16, 2018):
@adelowo The issue occured in a regular repo, not a mirrored one.
@bjoe2k4 commented on GitHub (Sep 16, 2018):
I have only observed this kind of behavior when pushing via read/write deploy key, which is already reported a while ago in #3795
@theAkito commented on GitHub (Dec 4, 2018):
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.
@lafriks commented on GitHub (Dec 4, 2018):
@Akito13 what version are you using?
@theAkito commented on GitHub (Dec 5, 2018):
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.
@stale[bot] commented on GitHub (Feb 3, 2019):
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.
@Exagone313 commented on GitHub (Feb 4, 2019):
This bug is still not resolved, please do not close.
@adelowo commented on GitHub (Feb 4, 2019):
I still cannot replicate this on a regular repository through
@Exagone313 commented on GitHub (Feb 4, 2019):
You can check the steps to reproduce of #5058, it's easy.
@zeripath commented on GitHub (Feb 4, 2019):
The issue with deploy keys should be fixed by #5935 and its backport to v1.7 #5944. Is there anything else causing this?
@stale[bot] commented on GitHub (Apr 5, 2019):
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.
@zeripath commented on GitHub (Apr 7, 2019):
Ok I'm gonna close this as fixed by #5935