Skip to content

Case insensitive branch problems #28850

Closed
@POPSuL

Description

@POPSuL

Description

After upgrade from 1.20.6 to 1.21.4 we have 2 related problems.

First

On exists repository we had two different branches with same name: issue-101 and ISSUE-101. Yep, I know that is so poor, but... And on repo page we got 500 with message:
SyncRepoBranches, Error 1062 (23000): Duplicate entry '100-ISSUE-101' for key 'UQE_branch_s'.
That resolved by removing remote branch successfully.

Second

After push 2 different branches with same name to gitea it not shows on branches page, but shows on commit graph and can be viewed by direct link (screenshot below).

PoC:

git checkout -b ABC
# do some changes
git commit -am 'ABC' && git push -u origin ABC
git checkout master
git checkout -b abc
# do some changes
git commit -am 'abc' && git push -u origin abc

Probably, that can fixed by change gitea.branch.name from utf8mb4_general_ci to utf8mb_bin.

Gitea Version

1.21.4

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

image
image

Git Version

2.27.0

Operating System

Centos 8

How are you running Gitea?

systemd unit

Database

MySQL/MariaDB

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions