Skip to content

Unique Constraint error when renaming a branch #30428

Closed
@sebastian-sauer

Description

@sebastian-sauer

Description

When renaming a branch to a branch name that was deleted before, a 500 error occurs with

An error occurred: RenameBranch, Error 1062 (23000): Duplicate entry '2118-Test123' for key 'UQE_branch_s'

Steps to reproduce

  • In an existing repo:
  • create a branch called Test123
  • create a second branch called Test234
  • Delete the branch Test123
  • Rename (via web ui) the branch Test234 to Test123

--> Error 500 with above mentioned error.

Gitea Version

1.21.10

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?

Binary from downloads

Database

None

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