-
Notifications
You must be signed in to change notification settings - Fork 260
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
Add option to open diff with working tree #457
Comments
Hi @hansunzner-kt, Thanks for raising this feature request! I'll include both of them in an upcoming release. |
Thanks! |
Hi @hansunzner-kt, Yes. the right side of the Visual Studio Code Diff View would be editable. This is equivalent to the Diff View opened when viewing the diff of a modified uncommitted change via the Git Graph View. |
I meant that in a normal diff view, independently of this new feature. |
What a pity that it didn't made it into the 1.29 😢 |
Hi @kt-unzner, This feature should be available for you to use in a beta release within the next week or two. Git Graph 1.30.0 is currently scheduled for release on 28/03/2021. |
👍
Yes I saw that. And that's adds the time I am still waiting for :-/ |
Both of these features will be available in v1.30.0 (which has been tentatively been moved forward by one week to 21/03/2021). If you'd like to use them before the next release, you can download v1.30.0-beta.1, and install it following the instructions provided here. |
Selecting "View Diff with Working File" enables now the possibility to edit a file in the diff view even if there are no changes to the file in the working directory -- that's very cool, thank you! |
Astonishing how much more comfortable this little feature makes the working. Thanks again for this! |
There are two main cases when Diff View's are opened via Git Graph:
|
Case two is the regarding case. Usually I have a look on what has changed last to this file and then open it at this position to continue there. Maybe you have a better idea for this workflow? |
Another question, not regarding this content: |
Your suggestion definitely seems like the best way to deal with this scenario. The hesitation I have, is that it would be a reasonably complex piece of logic to implement, that will only benefit the user when the file hasn't changed. Additionally user's might see the behaviour as inconsistent, as sometimes it goes to the "line of code" they want, other times it just opens the file. Throughout the extension, I tend to avoid any behaviour that is inconsistent (from the users perspective). I'd like to get the "Open File" from Diff View feature released first, and see what feedback I get from other users. This will allow us to make a more informed decision on how much value this would give users (when it is possible to do so) - the more value added, the more it outweighs any concerns.
Currently there isn't an option to view the stashes in the correct time order. As you mentioned, displaying the stash directly above the commit is generally what users prefer the majority of the time, however I definitely understand that there are edge cases where it's less than ideal. In the scenario when comparing a stash to another commit, one viewpoint is that regardless of the time of the stash, the vast majority of the codebase was at the stash parent's point-in-time - so the from-to order should be derived on the stashes parent compared to the other commit (the current behaviour). However this viewpoint could easily and equally be argued against. There are definitely some ongoing dilemmas around the right way to order things. Thanks for letting me know your scenario, and how the current behaviour impacts you. All user feedback like this is collated, and actioned upon once enough users share the same opinion. |
Thanks for detailed feedback.
Ah yes I forgot that it is not official released yet. And I agree to get first some feedback from the users. Another point: Your button "Open a Terminal" only opens a terminal as the name says. But the same looking button in the Shortcut Menu Bar toggles the terminal. May you want to adapt the bahaviour to the Menu Bar button? |
Hi @irvnriir, As mentioned in the release notes, this is included on the File Context Menu in the Commit Details View, not the Commit Context Menu (which is shown in your screenshot). The file context menu is shown when you right click on a file in the Commit Details View.
|
@mhutchie thanks . i have 1 Commit where it doesn't show X) . though it may be broken somehow -- the Commit also shows strange behavior at Cherry Pick . Is there a setting to put it on the right side of Diff ? (so the new/green values would be ones from the selected file) To work with saved/stashed updates/changes . |
Hi @irvnriir, There are a few cases where "View Diff with Working File" isn't available in the file context menu (all of which are necessary for a specific reason). It's the same conditions as the "View File at this Revision" action on the same context menu.
Just to clarify, are you asking whether there is a setting to switch the left & right sides of the Diff View (i.e. so the working file is on the left side, and file that you right-clicked on is on the right side)? If so, it's a convention for consistency across Visual Studio Code (including extensions), that the oldest file is on the left, and the newest file is on the right (as the working file is the "newest" file, it's always on the right side). |
@mhutchie oh, the editable is the right one, nm then . i guess i'm still with some kinetic from previous diff tool (and y, very tired) X) thanks for clarification and sorry for bothering :) |
Hi @irvnriir, All good, I'm glad I could help clarify the current behaviour. |
Hi,
It would be nice if I have the possibility to compare a selected file from a commit with the current working tree to be able to make changes in the diff view.
Something like this:
Furthermore it would be nice to have a button (on the Shortcut Menu Bar) or an entry in context menu to open the file from the current diff view. Like that one in the regular diff view:
The text was updated successfully, but these errors were encountered: