Giter VIP home page Giter VIP logo

Comments (5)

sshaw avatar sshaw commented on July 17, 2024

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:

  1. a commit
  2. a file with a line number
  3. a file with a line number range (if supported)
  4. 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.

peterbecich avatar peterbecich commented on July 17, 2024

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)
  1. An example commit: https://gerrit.googlesource.com/bazlets/+/efb3ad71f38e515eb1805ff457a077264b9f3dcc
  2. A file with a line number: https://gerrit.googlesource.com/bazlets/+/efb3ad71f38e515eb1805ff457a077264b9f3dcc/lib/prolog/java/PrologCompiler.java#46
  3. It appears a line number range is unsupported
  4. 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.

peterbecich avatar peterbecich commented on July 17, 2024

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.

sshaw avatar sshaw commented on July 17, 2024

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.

modulitos avatar modulitos commented on July 17, 2024

(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.

screenshot_1672205536

from git-link.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.