letmaik / vscode-git-tree-compare

🎄 VS Code extension for comparing the git working tree against a branch, tag, or commit, displayed as folder tree
https://marketplace.visualstudio.com/items?itemName=letmaik.git-tree-compare
MIT License
60 stars 7 forks source link

Jump to file not command not working as expected? #84

Closed tnrich closed 2 years ago

tnrich commented 2 years ago

Hey there! Thanks again for this great extension!

I am trying to jump to the changes view using the 'Git Tree Compare: Open Changes' command while inside a file with changes.

image

However it doesn't seem to be working and is confusingly asking me to right click on a file instead:

image

Can this be fixed or can you please add a way to open the changes for a given file.

Thanks again! Thomas

letmaik commented 2 years ago

The commands are not meant to be invoked from the command palette. If you click on the file in the tree view then it shows the diff. Are you saying this is too annoying since you need to find the file in the list again?

tnrich commented 2 years ago

@letmaik I think it would be really nice to be in a file that has been changed compared to master and to be able to jump to the diff view between the file and master. Does that make sense?

It would work basically the same as Git: Open Changes does:

image

which jumps you to the changes view:

image

I'm suggesting that if you're in a file with changes relative to the git-tree-compare branch you're comparing, then the following command:

image

Would open the git-tree-compare changes for that file

letmaik commented 2 years ago

Part of 1.14.0. I also added support for "Open File", for the case when you're in the diff editor.

tnrich commented 2 years ago

@letmaik awesome thank you so much for these changes! Definitely improves my workflow!