Comments (5)
Hi, thanks for the suggestion.
Does the Google example represent the path that one would get with a default JGit installation?
Also, if you can provide the following link structures for the follwing it would be helpful to explore adding this:
- a commit
- a file with a line number
- a file with a line number range (if supported)
- a Markdown or similar file with a line number, i.e., an unrendered version of the Markdown file. GitHub uses
plain=1
for this.
from git-link.
Thanks for the quick response
Does the Google example represent the path that one would get with a default JGit installation?
I don't have any other examples of Gitile repositories outside of https://gerrit.googlesource.com/
I don't think so, I have found another example with a different address scheme: #100 (comment) I don't know which, if either, is default.
I will guess that all some Gitile repositories take this form:
[Git http remote address]/+/[Git commit hash]/[file#line number]
For example repository https://gerrit.googlesource.com/bazlets/ with remote:
% git remote -v
origin https://gerrit.googlesource.com/bazlets (fetch)
origin https://gerrit.googlesource.com/bazlets (push)
- An example commit: https://gerrit.googlesource.com/bazlets/+/efb3ad71f38e515eb1805ff457a077264b9f3dcc
- A file with a line number: https://gerrit.googlesource.com/bazlets/+/efb3ad71f38e515eb1805ff457a077264b9f3dcc/lib/prolog/java/PrologCompiler.java#46
- It appears a line number range is unsupported
- It appears Markdown rendering can only be configured server-side: https://gerrit.googlesource.com/gitiles/+/HEAD/Documentation/config.md#disabling-markdown
There is no URL parameter I can find which disables it. Example markdown https://gerrit.googlesource.com/bazlets/+/efb3ad71f38e515eb1805ff457a077264b9f3dcc/README.md
from git-link.
Here is another collection of Gitile repositories: https://git.eclipse.org/r/plugins/gitiles/?format=HTML
One repository: https://git.eclipse.org/r/plugins/gitiles/www.eclipse.org/eef/
git clone ssh://git.eclipse.org:29418/www.eclipse.org/eef
It cannot be cloned due to an SSH access restriction.
One file in that repository: https://git.eclipse.org/r/plugins/gitiles/www.eclipse.org/eef/+/e9cbc436ca18671c1a5a6ae1fd40a9489259b08d/javadoc/2.1.1/org/eclipse/eef/provider/EEFRuleAuditDescriptionItemProvider.html
So I understand this could be complicated, because the address implied by the Git remote is:
https://git.eclipse.org/www.eclipse.org/eef/+/[commit]/[file name....]
but the actual address is
https://git.eclipse.org/r/plugins/gitiles/www.eclipse.org/eef/+/[commit]/[file name....]
from git-link.
Hi, thanks for all the information.
Given this, it seems that there is not standard config that one can use rather, they'd have to do a custom config based on their JGit-based service's defaults. Right?
Maybe an argument could be made to add something for gerrit.googlesource.com but then wouldn't that be Gerrit support? For that there was #81.
from git-link.
(Update: Looks like my change is limited to only googlesource.com
repos. I missed the fact that Gitiles repos can customize their URLs 🤦 Sorry for the confusion!)
@sshaw @peterbecich Thanks for the investigation here! I believe I have implemented support for gitiles in my PR: #105
I used googlesource.com
as an example (detailed in the PR), which hosts gitiles repos as well.
Unfortunately I was unable to test on the Eclipse repo above, because running git clone ssh://git.eclipse.org:29418/www.eclipse.org/eef
fails with a <$USER>@git.eclipse.org: Permission denied (publickey).
error.:
❯ git clone ssh://git.eclipse.org:29418/www.eclipse.org/eef eclipse-test
Cloning into 'eclipse-test'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
(note that I don't have a [email protected]
account)
It seems like the repository for https://git.eclipse.org/r/plugins/gitiles/www.eclipse.org/eef/ has been moved to Github (see screenshot below), which might explain why that gitiles repo is no longer publicly available.
from git-link.
Related Issues (20)
- Support not stripping ".git" from directory name
- Feature request: Add custom macro or function to define a custom git forge. HOT 4
- Fails to resolve insteadOf directives when looking up remote URLs HOT 1
- Feature Request: Choose from multiple remotes HOT 2
- support for http HOT 2
- support 'Gitea' 's (and its fokr : Forgejo ?) server ? HOT 3
- How to call git-link from another interactive function? HOT 1
- Git link from buffer created by `log-view-find-revision` goes to page not found on Github
- Feature request: git-link-open-homepage HOT 6
- Add support for Savannah HOT 1
- Proper sourcehut link HOT 2
- Move CI to GitHub Actions or CircleCI HOT 1
- Support custom HTTP scheme HOT 3
- Support for Linking to `git blame` Page & Linking to Documentation Files like Org and Markdown Files on Bitbucket HOT 2
- not working for files in an auxiliary worktree (using git-worktree) HOT 4
- mapconcat: Wrong type argument: arrayp, (47 97 98 99 100 101 102 103 104 105 ...) HOT 10
- Regression - incorrect directory passed to function in "git-link-remote-alist" HOT 2
- replaces / in branch name with %2F but github URL retains the / HOT 2
- Trailing slash quirk
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 git-link.