Sertion / vscode-gitblame

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

Git error when a file is deleted #78

Closed mariusvw closed 4 years ago

mariusvw commented 4 years ago

When selecting a file where the file and its parent directory is removed you get the following error

/usr/local/bin/git: No such file or directory. (ENOENT)
Sertion commented 4 years ago

Hello Marius. Thank you for the issue. I'll look at it.

Sertion commented 4 years ago

I've tried to delete a file and yet open it but I am unable to figure out a way to accomplish it.

Could you please walk me through the steps you take to recreate this issue?

mariusvw commented 4 years ago

My testcase, I make a repository and commit some files to it, then I remove all files.

Result 1, a file in the root

[ 16:37:25 | command ] /usr/local/bin/git rev-parse --show-toplevel
[ 16:37:25 | info ] Will not try to blame file "/Users/mariusvw/Workspace/testcase/project/stuff.conf" as it is outside of the current workspace

Result 2, a file in a subdirectory

[ 16:23:33 | command ] /usr/local/bin/git rev-parse --show-toplevel
[ 16:23:33 | critical ] Error: spawn /usr/local/bin/git ENOENT
[ 16:23:33 | info ] Will not try to blame file "/Users/mariusvw/Workspace/testcase/project/subdir/settings.conf" as it is outside of the current workspace

Result 3, rarely I see this message

[ 16:39:08 | info ] Will not try to blame file "extension-output-#8" as it is outside of the current workspace
Sertion commented 4 years ago

Ah. I think I know what is wrong. Thank you for the update.

Sertion commented 4 years ago

I'll push a patched version later today.

The third case is just feedback to the user that the "file" they are focusing on in the editor will not be blamed. In the case of "extension-output-#8" it is referring to the Extension: git blame view.

mariusvw commented 4 years ago

Updated, works, thanks! 👍