mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-11 19:39:02 +00:00
Allow compare refs named diff or patch to use the normal compare page while preserving explicit .diff and .patch downloads. Compare refs ending in diff or patch were incorrectly matched as raw .diff/.patch routes. This caused normal compare pages such as main...diff and main...patch to return an empty or invalid response. The route matching is now constrained so valid raw diff/patch downloads continue working while branches named diff or patch use the normal compare page. Assisted-by: Agent:GPT-5.6 Luna Fixes https://github.com/go-gitea/gitea/issues/40303 --------- Signed-off-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>