Skip to content

UI shows wrong commit for tag when re-pushing tag #21579

Closed
@silverwind

Description

@silverwind

Description

See example repos. Both having the same git content, but gitea UI shows the wrong commit when viewing the tag:

https://try.gitea.io/silverwind/symlink-test/src/tag/tag1
https://github.com/silverwind/symlink-test/tree/tag1

The tag was pushed, deleted and pushed again as follows:

# create first commit and tag
git commit --allow-empty -m tag1
git tag -a tag1 -m tag1
git push --follow-tags origin master

# delete tag
git tag -d tag1
git push origin :tag1

# create second commit and tag
git commit --allow-empty -m tag1fix
git tag -a tag1 -m tag1
git push --follow-tags origin master

It seems that either on tag deletion or on tag re-push, gitea did not correctly update the commit reference of the tag, resulting in the UI showing the wrong commit. I assume there must be some cache going stale as the git cli shows the tag on the correct commit when cloning down the repo.

Gitea Version

latest master

Can you reproduce the bug on the Gitea demo site?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/needs-feedbackFor bugs, we need more details. For features, the feature must be described in more detailtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions