Sertion / vscode-gitblame

Visual Studio Code Extension - See Git Blame info in status bar.
https://marketplace.visualstudio.com/items/waderyan.gitblame
MIT License
79 stars 32 forks source link

Git blame view button in notification allow to open selected range #39

Closed aliev closed 5 years ago

aliev commented 6 years ago

Would be great to show the blame of the selected lines of code. For example when I select lines from 3 to 6 in this file: https://github.com/Sertion/vscode-gitblame/blob/master/src/constants.ts url will be transformed in to: https://github.com/Sertion/vscode-gitblame/blob/master/src/constants.ts#L3-L6 when I click on the "View" button.

Thanks!

Sertion commented 6 years ago

Hello Ali!

Thank you for the issue!

Right now if you select more than one line it only blames the line where the cursor is placed (e.g. if you select 3-6 downwards only 6 is blamed).

When selecting multiple lines like this it is possible to run into more than one commit as well. How should those cases be handled?

I do like the idea of sending the user to the last blamed line instead of just blindly to the file they blamed!

You are very welcome to submit a pull request adding this functionality!

// Albin

Sertion commented 5 years ago

I have had time to do some more research here and it looks like it it not possible to build something here that would make sense in all online tools. Again it is BitBucket's Mercurial roots that is the exception.

If anyone ever thinks about something here, please create a new issue discussing the possibilities.