Comments (9)
We could possibly add a new token that would be the last part of the URL (sans .git
). Other than that I can't see where the project could come from.
Would that be helpful for Gitweb users? In this case there would be two tokens for gitblame.commitUrl
:
hash
- The active line's blame commit's hashproject-name
- The last section of the origin url (MyProject
fromssh://andrew@stamos:29418/MyProject
)
I will look into building this. The port will still be weird. It is not possible to guess the port.
from vscode-gitblame.
I think that would work. Thanks. In my case (as I think is standard with gitweb) is that only the project name and hash changes when specifying a url. The url looks something like this:
https://gerrit.ganchrow.com:8080/gitweb?p=<PROJECT>.git;a=commit;h=<HASH>
So, if you provide the project and hash tokens, the correct url can be generated from the commitUrl setting.
from vscode-gitblame.
Woohoo! It works. Thanks for adding this feature.
from vscode-gitblame.
Hello Andrew!
Thank you for the issue and output log!
What does git output when you run git ls-remote --get-url origin
in /path/to/your/project
? If it starts with ssh://git@
, git@
, or https://
the extension should try to open that URL using commands.executeCommand("vscode.open", commitOriginUrl);
[1][2] beyond that it is up to Vscode to know how to parse the URL. It could be that your origin does not match the pattern of a normal URL.
Is your git repository self hosted or are you using an online service?
[1]: Documentation for commands.executeCommand
[2]: Documentation for vscode.open
from vscode-gitblame.
Right...it isn't a normal url. We self-host and use urls like this:
ssh://andrew@stamos:29418/MyProject
I could optionally add an different remote with a more normal looking url, but it would be read-only. Does your extension support using a custom remote?
...and...it looks like you the extension supports the gitblame.commitUrl
command. So, let me try that.
from vscode-gitblame.
OK. This is working...mostly. I'm able to configure the commit URL so that it is correct for a single project.
There is still a problem, though. We are using gitweb as the viewer. Here is what a URL looks like:
https://stamos:8080/gitweb?p=MyProject.git;a=commit;h=${hash}
Notice that the project name is part of the URL. As far as I can tell, there is no way of using a variable for the project name. Do you have any ideas?
from vscode-gitblame.
Have started on a new version in #46 and will try to find time for a new release this weekend.
from vscode-gitblame.
A new version has been released. It might take a day or two before it appears for update in your editor. Please confirm if it solves the issue.
from vscode-gitblame.
from vscode-gitblame.
Related Issues (20)
- Feature Request - Right Justified Inline Blame Messages. HOT 1
- Fix "Terminal" view of blame for Windows CMD? HOT 2
- Kills the extension host HOT 1
- Request to update marketplace version HOT 3
- Git blame does not update state when new branch checked out HOT 1
- [Feature] Request inlineMessage Align to the right. HOT 1
- TypeError: Cannot read properties of undefined (reading 'toLowerCase') HOT 3
- Extension not showing correct commit HOT 11
- Causes computer to crash when switching branches HOT 1
- Shows old author name (username) HOT 1
- First name only? HOT 1
- `gitblame.delayBlame` triggers for each character typed HOT 5
- Alternate ssh profile breaks remote URL for nonstandard origins HOT 4
- Color and opacity HOT 2
- "waiting for git blame response" flashes very quickly whenever editing a file HOT 6
- the color of inline message too bright HOT 2
- Allow providing custom arguments to the invocation git blame HOT 10
- Incorrect issues URL in changelog HOT 1
- Bonobo Git Server uses UUID for repository IDs HOT 2
- Define a custom theme color for the inline message HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-gitblame.