Skip to content

Tag with "/" in name blocks pushing of tag with similar name #7985

Closed
@j123b567

Description

@j123b567

Description

If the repository has tag e.g. a/v1 and also tag v1, then the later one cause problems with gitea. For git itself, it is completely valid scenerio.

Gitea receives the tag but reports

remote: Gitea: Internal Server Error
remote: Failed to Update: tagtest/tagtest1 Branch: v1 Error: PushUpdateAddTag: GetTag: object does not exist [id: v1, rel_path: ]

Tag is later not shown in releases but can be directly accessed by typing correct URL
for tag a/v1 https://try.gitea.io/tagtest/tagtest1/src/tag/a/v1
for tag v1 https://try.gitea.io/tagtest/tagtest1/src/tag/v1

Steps to reproduce

mkdir test
cd test
git init
git commit -m a
git tag a/v1
git tag v1
git remote add origin https://try.gitea.io/tagtest/tagtest2.git
git push -u origin master
git push --tags

This cause an error and tag v1 is not visible in the UI but it should be.

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