### Gitea Version 1.16.4 ### Git Version 2.30.2 ### Operating System Debian bullseye ### How are you running Gitea? Through the 3rd party debian package repo. ### Database PostgreSQL ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Description Pushing to a branch which wasn't previously known to gitea leads to broken compare links like this in the activity overview https://server/nidi/test-gitea-issues/compare/0000000000000000000000000000000000000000...f6f27fa74aaecedbcf4b4a3625ceafd6fc368ef6 This happens when doing git push --set-upstream origin branch_name I wasn't able to reproduce this on try.gitea.io as I stumbled over #19143 instead. ### Screenshots _No response_