Skip to content

When the remote repository force push to overwrite a tag, the mirrored repo will not update the tag updated time #32233

Closed
@imkuang

Description

@imkuang

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:
image
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

  1. server1 for remote, server2 for local
  2. create a repo on server1, initialize a few commits, create a new tag v1 and push it
  3. 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
  4. 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
  5. go to the settings page of the repo on server2 and sync immediately to see the problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions