### Description The API using (#30349) is unable to compare differences between diff commit ids. But it works fine on the Web UI.   [Compare UI](https://gitea.com/actions/cache/compare/e29dad3e36390db18fc19fb666cb1302f4929002...main) [Compare API](https://gitea.com/api/v1/repos/actions/cache/compare/e29dad3e36390db18fc19fb666cb1302f4929002...main) ### Gitea Version main ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? online ### Database None