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

why guess url? #89

Closed xgdgsc closed 3 years ago

xgdgsc commented 3 years ago

I noticed you guess url and there are known limitations. Can' t you read from config ?

Sertion commented 3 years ago

Hey xgdgsc!

Right now we guess based on the data we can gather from the git cli on the system as ran from the folder where the tracked file resides. That is the best way I know how to do it.

The reason the setting is called "guess" is because even when we use the data from the CLI we can't be certain that the user isn't on some very uncommon setup where they git repository origin and the online viewing tool are on completely separate domains.

If there is a configuration option in the git cli for an online viewing tool I would love to add support for it.

xgdgsc commented 3 years ago

Why would the opened url is https with no port number but the called command like git config --local --get remote.origin.url returns url with correct http and port number?

Sertion commented 3 years ago

I will look into adding this case.

Sertion commented 3 years ago

A new version was just uploaded to the marketplace. It supports keeping the port for http and https origins as well as keeping the protocol as long as it is http or https.

Please comment here if it isn't working as expected.