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

Extension does do anything when clicking on bottom bar button #138

Closed alexgille closed 1 year ago

alexgille commented 1 year ago

Hi,

The extension used to work but isn't anymore since few weeks. Clicking on the "Blame XXX (Y Z ago)" has not effect at all, except showing "Waiting for [...]" very fast (too fast to read).

A brand new install of the extension did nothing to the issue, neither did restarting VSCode.

VSCode details :

Version: 1.76.0
Commit: 92da9481c0904c6adfe372c12da3b7748d74bdcb
Date: 2023-03-01T10:23:06.752Z (1 wk ago)
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Darwin arm64 21.6.0
Sandboxed: Yes

And git version 2.37.0

Thanks

Sertion commented 1 year ago

Hey Alexandre! Thanks for the report.

Do you know if you have set any setting that modify the default behavior of the extension? Can you also please verify that it is this extension that you interact with and not another one like GitLens?

Last update was a few months ago so it is a bit weird that the behavior is changing now. Do you know if you recently updated git?

alexgille commented 1 year ago

I haven't changed anything on my setup since, except VSCode updates, and I don't configure VSCode with particular settings. This extension is the only one I use related to Git.

I forgot to mention that I've been facing this issue for weeks (but not months), maybe related to the latest update.

Sertion commented 1 year ago

I've looked some more and I can't see anything obvious that is wrong. Does the line have blame info if you run git blame -- FILE_PATH?

If you want to look into what could be wrong yourself I would appreciate it a lot.

It should be possible to debug the extension from within vscode by setting breakpoints and running the "Extension" setup from the Run and Debug options.

The default action from pressing the status bar view when the extension has found a commit for the current line is Extension.showMessage. The brief flash of "Waiting for git blame response" you see comes from the this.view.activity() call in Extension.commit.

If the extension is showing blame information for a line in the status bar it should be available in the Blamer and it should not be able to miss finding it a second time.

MKHokinson commented 1 year ago

Hey @alexgille, I was having the same issue with this and a few other extensions. After an embarrassing amount of time spent faffing about with them and debugging this extension, it appears that the popup windows act as notifications. I had disabled the popup notifications in the bottom right, hence causing this extension and others to "stop working". You should be able to check by hitting the bell in the lower right hand corner.

alexgille commented 1 year ago

Hey @MKHokinson, thanks for the tip! You saved my VSCode (and some long debugging time 😄). The issue was definitely the notifications being disabled.

alexgille commented 1 year ago

Sorry for the late answer @Sertion, indeed my git blame was printing the right details with the right syntax. I would have looked into the extension with the debugger but it would have taken me long time to understand the situation 😅. Now the issue is fixed and people have an official solution for it.