Refactor getpatch/getdiff functions and remove unnecessary fallback#32817
Conversation
wxiaoguang
left a comment
There was a problem hiding this comment.
To be honest, I do not think the parseCompareArgs behavior is right.
It sometimes returns {"a..b"}, sometimes returns {"a", "b"}, does it really make sense? Why not make callers just pass "a...b" or "a..b"? And what's the use case for parsing a b (space separator)?
We can strictly |
Yes, it is absolutely a problem. It is not a right habit or legacy reason. Git does NOT support |
* giteaofficial/main: demilestone should not include milestone (go-gitea#32923) fix textarea newline handle (go-gitea#32966) Fix Azure blob object `Seek` (go-gitea#32974) Fix maven pom inheritance (go-gitea#32943) Refactor arch route handlers (go-gitea#32972) [skip ci] Updated translations via Crowdin Refactor tmpl and blob_excerpt (go-gitea#32967) Clarify path param naming (go-gitea#32969) Refactor getpatch/getdiff functions and remove unnecessary fallback (go-gitea#32817) Refactor request context (go-gitea#32956)
Extract from #32786
git diff a..bis equal togit diff a bwhich is different fromgit diff a...b. For the pull request, we should always usegit diff a...b.