mirror of
https://github.com/go-gitea/gitea.git
synced 2025-02-26 21:13:10 +08:00

Backport #29470 by @silverwind Ported the function as-is and added comments so we don't forget about this in the future. Fixes: https://github.com/go-gitea/gitea/issues/29462 Co-authored-by: silverwind <me@silverwind.io>