Resolve a `^` or `~N` revision suffix to a commit before comparing, so the compare API accepts `base...head^` and `~N` on either ref.
Pull request creation still requires branch refs and the web compare page keeps rejecting suffixes.
Closes#33943
Assisted-by: Claude Code:claude-opus-4-8