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

Add variable for whole hostname #118

Closed fbuetler closed 2 years ago

fbuetler commented 2 years ago

Hi,

It would be nice to have a variable that contains the whole hostname and not only parts of it like ${gitorigin.hostname,n}. So maybe ${gitorigin.hostname} (without the index) could work.

I am using a self hosted bitbucket server and currently my config is:

"gitblame.commitUrl": "https://git.company.com/projects/${gitorigin.path,0}/repos/${project.name}/commits/${hash}"

I know I can do something like

${gitorigin.hostname,0}.${gitorigin.hostname.1}.${gitorigin.hostname,2}/path

but thats ugly and https:// is not included.

Another approach is to support self hosted bitbucket servers out of the box.

See also https://github.com/Sertion/vscode-gitblame/issues/98

Sertion commented 2 years ago

Hey Florian!

Have you tried gitorigin.hostname without an argument?

Sadly I will never be able to guess a remote hosts preferred protocol in a satisfying way so that part (http(s)://) still needs to be manually determined.

Sertion commented 2 years ago

If this remains an issue please comment again and I will re-open this issue.