Skip to main content
Jump to: navigation, search

Difference between revisions of "JGit/New and Noteworthy/5.11"

m
m
Line 16: Line 16:
 
Pushing via JGit always uses protocol V0.
 
Pushing via JGit always uses protocol V0.
  
<TBD: JGit's server side (class <tt>UploadPack</tt>) has supported protocol V2 for handling fetches for a while already, but it was not the default. With JGit 5.11, protocol V2 has been made the default also for the server side.>
+
JGit's server side (class <tt>UploadPack</tt>) has supported protocol V2 for handling fetches for a while already, but it was not the default. With JGit 5.11, protocol V2 has been made the default also for the server side.
  
 
== Other Changes ==
 
== Other Changes ==

Revision as of 07:16, 4 January 2021

JGit

Git Protocol

The git protocol is the application-layer protocol git uses for communication between a git client and an upstream (git server). It is implemented atop the transport protocol (like HTTPS or SSH). Git has two different protocols for communicating with an upstream. Protocol V2 is supposed to be more efficient than the older protocol V0/V1.

JGit 5.11 supports git protocol V2 for fetching. When JGit does a fetch, it always requests protocol V2 (unless overridden by a git config, see below). If the server response indicates that the server can do only protocol V0/V1, JGit falls back to using that older protocol. If the server replies with a valid protocol V2 answer, protocol V2 is used.

On the client side, git config protocol.version controls which protocol is used by JGit for fetching. Possible values are:

  • 2 or not set: JGit requests protocol V2 and falls back to protocol V0 if the server does not support protocol V2.
  • 0 or 1: JGit uses protocol V0.


(Protocol V0 and V1 are identical except for an additional line "version 1" in V1 in the initial server response.)

Pushing via JGit always uses protocol V0.

JGit's server side (class UploadPack) has supported protocol V2 for handling fetches for a while already, but it was not the default. With JGit 5.11, protocol V2 has been made the default also for the server side.

Other Changes

The complete list of new features and bug fixes is available in the release notes.

Contributors

The following X developers worked on this release:

<TBD: list of contributors, number>

Copyright © Eclipse Foundation, Inc. All Rights Reserved.