Description
Description
When using the mirroring feature to sync a repo from another server, if the remote server force push overwrites a tag, the local server will not update the updated time of these tags after completing the synchronization.
Finally, we will see the following situation on the webui: two tags with different update times have the same commit id:
You can check the test repository I created (I've converted it to a regular repo to remove the personal server url I use for mirroring operations): https://demo.gitea.com/404notfound/test/tags
This is common when synchronizing GitHub Actions repositories, where tags containing only the major version number are often constantly updated to always point to the latest version.
Gitea Version
1.22.3
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?
run gitea from docker
Database
SQLite
Steps to reproduce
- server1 for remote, server2 for local
- create a repo on server1, initialize a few commits, create a new tag v1 and push it
- create a new migration on server2 and select Git (not sure if it has any influence), fill in the URL of the repo on server1
- run git tag -d v1 to delete tag v1, create several new commits, and then re-create tag v1, git push --tags -f to push new tag references to server1
- go to the settings page of the repo on server2 and sync immediately to see the problem