Skip to content

Case insensitive branch problems #28850

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
POPSuL opened this issue Jan 19, 2024 · 3 comments
Closed

Case insensitive branch problems #28850

POPSuL opened this issue Jan 19, 2024 · 3 comments
Labels

Comments

@POPSuL
Copy link
Contributor

POPSuL commented Jan 19, 2024

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

@lunny
Copy link
Member

lunny commented Jan 19, 2024

This has been resolved in 1.22 by #28662, but because of migration problem, it cannot be backport to v1.21.
You can manually change the database collation to resolve the problem.

@POPSuL
Copy link
Contributor Author

POPSuL commented Jan 19, 2024

Thanks!

@POPSuL POPSuL closed this as completed Jan 19, 2024
Copy link

github-actions bot commented Mar 1, 2024

Automatically locked because of our CONTRIBUTING guidelines

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants