-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor getpatch/getdiff functions and remove unnecessary fallback #32817
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
Extract from #32786
git diff a..b
is equal togit diff a b
which is different fromgit diff a...b
. For the pull request, we should always usegit diff a...b
.