Skip to main content


Oh, this is gold.

MySQL uses case insensitive collation by default, Postgres and SQLite don't.

Git allows branch names that differ in case only: main, MaIn, and MAIN are three different branches.

Gitea stores the branch names in the database too.

The result: if you have a repo with branch names that differ in case only, and you use MySQL/MariaDB, Gitea will error out on them. It will also fail to properly import or migrate such repositories.

This problem has been - apparently - known since July. The fix is to update the collation to a case sensitive one. Yet, their docs still suggest setting a case insensitive one.

I submitted a PR to update the docs only, so that new installations aren't broken by default. I got pointed to the draft PR.

I mean... okay, but... if you've known the problem for months, wouldn't it make sense to update the docs, so that people don't create broken installs while you develop a proper fix?

it's rather offotpic to mention that we still fight with a bunch of legacy databases ran on #mysql which had case sensitive table names, except, they are only c.s. in the filesystem but not according to the server code so various table-level functions may or may not work, may end up with file not found or file already exists. It is a clusterfuck.