Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Does EGit 5.x support the Git protocol version 2?(Can the Git protocol version 2 be used in EGit and if so, what is required? For which actions are there performance advantages?)
Does EGit 5.x support the Git protocol version 2? [message #1794862] Sun, 09 September 2018 07:55 Go to next message
Holger Voormann is currently offline Holger VoormannFriend
Messages: 26
Registered: July 2009
Junior Member
Since JGit 5.0 the Git protocol version 2 is supported.

Can the Git protocol version 2 be used in EGit and if so, what is required (e. g. does Git have to be installed on the command line?) and for which actions are there performance advantages?

What I've been trying to do so far:

  1. Preconditions: Eclipse IDE for Java Developers 2018-09 RC1 (containing EGit/JGit 5.1), but no Git on the command line (on Windows 10)
  2. In global configuration (Windows > Preferences: Team > Git > Configuration: User Settings) add key "protocol.version" with value "2"
  3. Clone Git repository "https://chromium.googlesource.com/chromium/src.git" (which is said to support the Git protocol version 2) branch "ignore/bar" only


Result actual: Apparently no speed differences to without "protocol.version" set to "2".
Expected: Faster cloning of a single branch with "protocol.version" set to "2".

I also tried without success with a bare repository, configured "protocol.version" at the repository and then fetched the branch.

Does EGit 5.x not support the protocol, did I missed to configure something or is there no visible speed difference in the selected example repository when executing clone?
Re: Does EGit 5.x support the Git protocol version 2? [message #1794866 is a reply to message #1794862] Sun, 09 September 2018 17:01 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
Cloning the chromium repo transfers some 12.32 GB. I would expect any timings be dominated by the time needed to do this transfer, not by the time needed for the initial ref advertisement.
Re: Does EGit 5.x support the Git protocol version 2? [message #1794867 is a reply to message #1794866] Sun, 09 September 2018 17:40 Go to previous messageGo to next message
Holger Voormann is currently offline Holger VoormannFriend
Messages: 26
Registered: July 2009
Junior Member
Hi Thomas,

Thank you for your answer and your work as JGit and EGit committer.

Are there any operations other than clone where the advantages of the new protocol can be seen? Or another public repository where the differences become visible?

Git protocol 2 also supports partial cloning, but this is not yet supported by JGit/EGit, right?

Thanks,

Holger
Re: Does EGit 5.x support the Git protocol version 2? [message #1794907 is a reply to message #1794867] Mon, 10 September 2018 17:05 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 576
Registered: August 2016
Senior Member
Holger,

take the following with a grain of salt; I haven't followed the protocol V2 implementation closely.

It looks to me that most of the work done in JGit for protocol V2 was for the server side (UploadPack, handling git fetch). I don't see client-side improvements (for instance, I think JGit's LsRemoteCommand (git ls-remote) should be able to exploit the new ls-refs command of protocol V2 to let the server do the filtering).

I also don't see anything in Gerrit yet; I would have expected at least something to handle the GIT_PROTOCOL variable when the ssh protocol is used, but didn't find anything.

So to me this looks unfinished. But then, maybe I was looking in the wrong places...

But post on jgit-dev; there you have a better chance of one of the Google people who implemented this answering.
Re: Does EGit 5.x support the Git protocol version 2? [message #1794911 is a reply to message #1794907] Mon, 10 September 2018 22:54 Go to previous message
Holger Voormann is currently offline Holger VoormannFriend
Messages: 26
Registered: July 2009
Junior Member
Hi Thomas,

Many thanks for the answer. I hadn't thought about the server side.

Thanks for the hint and the insight,

Holger
Previous Topic:Create bare Jgit repo with public ssh key auth
Next Topic:Revert to a an old commit/revision
Goto Forum:
  


Current Time: Thu Apr 25 16:34:05 GMT 2024

Powered by FUDForum. Page generated in 0.03651 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top