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

'View' button leads to dead link when repo is fully local #128

Closed millibeckers closed 1 year ago

millibeckers commented 1 year ago

Steps to Reproduce

  1. Create a git repo locally with git init. Do not add any remotes. (Verify with git remote - there should be no output)
  2. Commit some things to your repo
  3. Open files in VSCode, click blame widget in VSCode to trigger the Git Blame popup
  4. Click 'View' button on popup
  5. Observe

Observed Behavior

'View' button appears on popup and leads to the link https://origin//commit/<commitHash>. Obviously this link does not work.

Expected Behavior

The 'view' button probably shouldn't appear for local-only repositories.

If you wanted to get really fancy you could potentially update it to open a new tab in VSCode with the results of git show <commitHash> or something like that, but that's more of a feature request.

Sertion commented 1 year ago

Hey Milli. Thanks for the bug report!

Will take a look.

Sertion commented 1 year ago

I've fixed it so that the View-button no longer appear when it can't find a remote URL in the upcoming version.

If you want to extend the behavior of the extension please submit a feature request.

millibeckers commented 1 year ago

Amazing, thank you for the quick turnaround!