dalehagglund/magit — comment on commit 622781bc05a58170748d22d1303cbc29f19ab751
File:  line 0
By dalehagglund:

Did you by any chance mean to say "introduce some `magit-show-item` action"? Assuming so, I guess I have a hard time seeing how it wouldn't be quite similar to `magit-view-item` in many cases. For instance, wouldn't the actions for commits and stashes be exactly the same? Would such `magit-show-item` have meaning in the status buffer, and when applying it to a file (or even a diff / hunk) there, how would it's actions be different that the current visit behaviour? If the behaviours overlap to large degree, I would suggest that's evidence that in fact they're the same operation.

If I'm understanding you correctly, you're concerned about two things:

- `magit-view-item` should always take you somewhere that you can "continue working".
- How to distinguish between the various different instances of a file that the user might be interested in: the current working directory version, the pre-commit version, or the post-commit version. (Does a merge commit have even another, ie, the common ancestor?)

For the former, I would argue that when looking at a diffbuf, the user is looking at an immutable view of some change in the repo. Given that, it feels reasonable to me that "continue working" can reasonably include "inspect the result of that immutable change in more detail". For the latter, I think that visit-item on a hunk/diff in a diffbuf needs to choose the "most useful" (and there, of course, lies the difficulty) of those possible instances to display. For me, obviously, the "most useful" is the post-commit version of the file.

I'm not quite sure how to proceed. I can continue to try to justify my position, but I don't want to waste your time if you're definite that `magit-view-item` shouldn't change in this way. Do you have any slightly more concrete thoughts on how your alternate perspective might look? That might give me something I could react to more constructively. Finally, we can just agree to disagree and I can maintain this on my own.

Thoughts?