Eclipse JGit: Java implementation of Git 5.13.0

Features

  • GitServlet: allow to override default error handlers
  • transport: add object-info capability that allows clients to query the remote server for object metadata (currently only size). This is a backport of the same capability that was recently added to the Git project in commit a2ba162cda.
  • DFS block cache: add additional stats to DfsReaderIoStats providing details about loading pack, bitmap and reverse indexes.
  • 575327 [gpg] Better GPG home directory determination
    • GPG can use customized directories instead of the standard ~/.gnupg or %APPDATA%\gnupg directories:
      • Environment variable GNUPGHOME can define the location.
      • On Windows, a registry key may define the location (but this is deprecated).
      • Portable installations may use a directory defined via a file "gpgconf.ctl".
      •  GPG programs may take a --homedir command-line argument, which overrides anything.
    • Implement handling of environment variable GNUPGHOME. The other ways of GPG to get its home directory are outside the reach of JGit. Provide a system property "jgit.gpg.home" that the user can set in such cases.
    • Do tilde replacement for the system property and for GNUPGHOME.
    • Note that on VMS, the default directory would be ~/gnupg (without dot). This is not accounted for, but a user on VMS could now use either the system property or GNUPGHOME to direct JGit to the right directory.
  • 446355 Support commit.template config property
  • 574635 [sshd] Distinguish key type and signature algorithm for host key
  • 574636 [sshd] Implement SSH config KexAlgorithms
    • Make the used KEX algorithms configurable via the ssh config.
    • Also implement adding algorithms not in the default set: since sshd 2.6.0 deprecated SHA1-based algorithms, it is possible that the default set has not all available algorithms, so adding algorithms makes sense. This enables users who have to use a git server that only supports old SHA1-based key exchange methods to enable those methods in the ssh config: 

      "KexAlgorithms +diffie-hellman-group1-sha1"
    • There are two more SHA1 algorithms that are not enabled by default: diffie-hellman-group14-sha1 and diffie-hellman-group-exchange-sha1.
    • KeyAlgorithms accepts a comma-separated list of algorithm names.
    • [sshd] Log the full KEX negotiation result to help debugging KEX problems.
  • Teach independent negotiation (no pack file) using an option "wait-for-done"
    • From Git commit 9c1e657a8f:
      • Currently, the packfile negotiation step within a Git fetch cannot be done independent of sending the packfile, even though there is at least one application wherein this is useful - push negotiation. Therefore, make it possible for this negotiation step to be done independently.
      • This feature is for protocol v2 only.
      • In the protocol, the main hindrance towards independent negotiation is that the server can unilaterally decide to send the packfile. This is solved by a "wait-for-done" argument: the server will then wait for the client to say "done". In practice, the client will never say it; instead it will cease requests once it is satisfied.
      • Advertising the server capability option "wait-for-done" is behind the transport config: "uploadpack.advertisewaitfordone", which by default is false.

Performance Improvements

  • UploadPack searchForReuse might impact performance in large repositories. The search for reuse phase for all the objects scans all the packfiles, looking for the best candidate to serve back to the client. This can lead to an expensive operation when the number of packfiles and objects is high. Add option "pack.searchForReuseTimeout" to limit the time spent on this search.
  • BatchRefUpdate: Skip saving conflicting ref names and prefixes in memory improving the BatchRefUpdate performance from O(n^2) to O(1).
  • Optimize RefDirectory.isNameConflicting() improving the name conflicting check from O(n^2) to O(1).

Bug Fixes

  • 575367 Ignore IllegalStateException if JVM is already shutting down
  • 575385 Ensure FS#searchPath only selects executable files
  • Fix RevWalk#getMergedInto's result which was wrong on the second call
  • [sshd] Ignore revoked keys in OpenSshServerKeyDatabase.lookup()
  • [pgm] Fix default meta variable defined in StopOptionHandler
  • 573791 Retry loose object read upon "Stale file handle" exception
  • 574178 Fix garbage collection failing to delete pack file
  • 574253 Fix PathSuffixFilter: can decide only on full paths
  • Fixing visibility for HostEntry constructors.

Build and Release Engineering

Update dependencies:

  • orbit to R20210825222808 for 2021-09
  • assertj to 3.20.2.v20210706-1104
  •  com.google.gson to 2.8.7.v20210624-1215
  • hamcrest to 2.2.0.v20210711-0821, junit 4.13 requires hamcrest-core and hamcrest-library 1.3 therefore keep them in the target platform
  • javaewah to 1.1.12.v20210622-2206
  • jetty to 9.4.43.v20210629
  • JMH used in benchmarks to 1.32
  • org.apache.commons.compress to 1.20.0.v20210713-19
  • 574220 org.apache.sshd.osgi to 2.7.0.v20210623-0618
  • 574220 org.apache.sshd.sftp to 2.7.0.v20210623-0618
  • org.bouncycastle.bcpg to 1.69.0.v20210713-1924
  • org.bouncycastle.bcpkix to 1.69.0.v20210713-1924
  • org.bouncycastle.bcprov to 1.69.0.v20210713-1924
  • org.bouncycastle.bcutil 1.69.0.v20210713-1924
  • org.tukaani.xz to 1.9.0.v20210624-1259
  • Relax version range for hamcrest and assertj

Update maven plugins:

  • jacoco-maven-plugin to 0.8.7
  • maven-dependency-plugin to 3.2.0
  • maven-jxr-plugin to 3.1.1
  • spotbugs-maven-plugin to 4.3.0

Miscellaneous

  • [test] Create keystore with the keytool of the running JDK
  • Add 4.21 target platform
  • Update 4.20 target platform to use final 4.20 release
  • Remove use of deprecated getAllRefs() in ReceivePack
  • [releng] japicmp: update last release version to 5.12.0.202106070339-r.
  • Update bazlets to react on Maven central no longer supporting http protocol but only https
  • Update bazel version to 2.0
  • bazel: don't expose jsch and jzlib to org.eclipse.jgit

Documentation

  • CONTRIBUTING: add explicit link to ECA
  • CONTRIBUTING: Use standard markdown format
  • Add Eclipse code of conduct and security policy

     
Release Date
Release Type
Minor release
This release is part of Eclipse IDE 2021-09