mhutchie / vscode-git-graph

View a Git Graph of your repository in Visual Studio Code, and easily perform Git actions from the graph.
https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph
Other
1.97k stars 260 forks source link

Add a command to show the diff of a commit with the working tree #782

Open noamraph opened 1 year ago

noamraph commented 1 year ago

Describe the feature that you'd like It would be nice to have an additional command in the context menu when right-clicking a commit, "compare to working tree".

Additional context (optional) Comparing the working tree to a commit is something I do a lot, when reviewing a pull request by me or by someone else. I compare with the master branch, and It allows me to easily see the changes and make changes.

I just searched for a few minutes for how to do it with git-graph (which is an excellent extension, thanks a lot!). I found this related issue: https://github.com/mhutchie/vscode-git-graph/issues/457, but it didn't help me, since it only allowed me to view the difference with the files changed in the specific commit in master, which didn't include my changes.

I then found out that I can select the commit and the working tree, to get exactly what I wanted. But it took me some time to discover (I even installed GitLens, following some Stack Overflow advice, and soon removed it. Yuck.). Adding this to the commit context menu would have helped me discover it much more quickly.

Thanks a lot! Noam