Replies: 4 comments 3 replies
-
It shows the most logical diff for the thing at point, but that is not what you want.
Sounds like Or to be able to show that diff instantly, without having to first navigate to the respective section in the status buffer or typing in a range, you could add a dedicated command: (defun my-magit-diff-upstream (&optional args files)
(interactive (magit-diff-arguments))
(magit-diff-setup-buffer "@{upstream}..." nil args files 'committed)) |
Beta Was this translation helpful? Give feedback.
-
Since this discussion got bumped, one thing I'd like and expect from the DWIM command is that when I have point on a commit or ref, DWIM would give me the diff between the current worktree and that commit or the head of that ref. That is 99.99% of the time what I want when diffing. |
Beta Was this translation helpful? Give feedback.
-
Actually, I wasn't thinking about doing the diff while the rebase is in progress, just when outside of a rebase, although that could be useful too. My question was only related to my earlier rebase query by me wanting some commands that conveniently operate with respect to the branch point. Thanks for your answer, the interactive argument fix sorted out my main issue, and I can take a look at getting the rebase head name when I need that. |
Beta Was this translation helpful? Give feedback.
-
What threw me off about this statement is that a diff has two endpoints. To me “the most logical diff for the thing at point” means the diff between the thing and my working tree. I still don't know what DWIM actually does when you do it on a commit, but it sounds like it shows you the same thing as when you just hit RET on that commit, i.e. shows you the changes made by the commit(?) If that's the case, I wonder why you'd want a secondary, slower way to do that than simply hitting RET. Since I don't know what this thing actually does, I can just continue to not use it, but perhaps for other users you'd consider changing the name to something more descriptive of its intent, since "what I mean" depends very much on who "I" turns out to be. Looking at the manual, it seems none of the DWIM stuff is described in a way that isn't pretty subjective. Even if you don't change the names, writing these things down would make the commands more useful for everyone else. |
Beta Was this translation helpful? Give feedback.
-
I'm not even sure what it really does. The thing I want most often is a diff against
origin/main
and it would be nice not to have to think about "ranges" and then type that ref name out in that case. I don't have a concrete suggestion yet, and I realize this reads a bit like a complaint, sorry. I wanted to open a discussion before making a feature requrest.Beta Was this translation helpful? Give feedback.
All reactions