You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's pretty ridiculous how the meaning of .. and ... is exactly swapped for log and diff: log A..B is changes from merge base to B which is what diff A...B does
The semantics of .. vs ... are essentially swapped between diff and the log family of commands. This is because diff uses setup_revisions but abuses the way that the returned endpoints are used.
There are several options to deal with this:
Print a warning into the output if a user uses git diff A..B instead of git diff A B (see here)
Update the documentation for git-diff so that it's obvious why this is happening (so we tell users about how range-notation is implemented). Upside is users will understand why git diff foo@^! works as well. Downside is that I'm not sure it's productive to expose implementation details to end-uers.
Swap the meaning of .. and .... One can dream...
Something else? I've been mulling over it and not wanting to contribute a patch because there might be some cleaner way to resolve this. Not really sure how.
Well, .. has been deprecated in the docs. And users can avoid using range-notation entirely via the --merge-base flag now: b6fb70c. I'll declare this one closed.
Activity
Denton-L commentedon Nov 2, 2020
Well,
..has been deprecated in the docs. And users can avoid using range-notation entirely via the--merge-baseflag now: b6fb70c. I'll declare this one closed.