541274, 541275 sshd: add support for ssh-agent. Add a simple SSH agent connector using JNA. Include com.sum.jna and com.sun.jna.platform in the target platform. JNA is used to communicate through Unix domain sockets with ssh-agent, and if on Windows, to communicate via shared memory with Pageant. The new bundle o.e.j.ssh.apache.agent is an OSGi fragment so that the java.util.ServiceLoader can find the provided factory without further ado in OSGi environments. Adapt both maven and bazel builds to include the new bundle. Manually tested on OS X, CentOS 7, and Win10 with Pageant 0.76.
576971 Binary and CR-LF detection: lone CRs -> binary. C git considers not only files containing NUL bytes as binary but also files containing lone CRs. Implement this also for JGit. C git additionally counts printable vs. non-printable characters and considers files that have non_printable_count > printable_count / 128 also as binary. This is not implemented because such counting probably only makes sense if one looks at the full file or blob content. The Auto[CR]LF* streams in JGit look only at the first few KiB of a stream in order not to buffer too much.
576971 Make the buffer size for text/binary detection configurable
GarbageCollectCommand: add numberOfBitmaps to statistics
Don't block in GC#gc until garbage collection finished. Let GC#gc return collection of newly created packs as CompletableFuture to enable using gc() asynchronously.
576340 [6.0 API cleanup] Public interface for PackLock. Provide a public interface PackLock exposing only the unlock() method. Rename the internal PackLock class to PackLockImpl and have it implement the new interface.
576340 [6.0 API cleanup] StoredObjectRepresentationNotAvailableException. Remove the unused parameter, which had a non-API type anyway.
RepoCommand: Do not wrap GitApiExceptions in GitApiExceptions. While building the commit for the destination project, RepoCommand catches GitApiExceptions and wraps them into ManifestErrorException (a subclass of GitApiException). This hides the real exception from the caller and prevent them to do a fine-grained catch. Specifically this is problematic for gerrit's supermanifest plugin, that won't see ConcurrentRefUpdate exceptions to detect lock-failures. Use ManifestErrorException to wrap non-GitApiExceptions, let GitApiExceptions pass through as they are.
[6.0 API cleanup] CancelledException vs. CanceledException. Use the GitAPIException CanceledException instead of IOExceptionCancelledException in the rename detector.
564544 Fix split package in bundle org.eclipse.jgit.ssh.jsch
DFS block cache: allow multiple passes for blocks before eviction
577492 FS: debug logging only if system config file cannot be found
AppServer: fix keystore used to setup test SSL context factory
576604 Set JSch global config values only if not set already
577358 Better git system config finding. We've used "GIT_EDITOR=edit git config --system --edit" to determine the location of the git system config for a long time. But git 2.34.0 always expects this command to have a TTY, but there isn't one when called from Java. If there isn't one, the Java process may get a SIGTTOU from the child process and hangs. Arguably it's a bug in C git 2.34.0 to unconditionally assume there was a tty. But JGit needs a fix *now*, otherwise any application using JGit will lock up if git 2.34.0 is installed on the machine. Therefore, use a different approach if the C git found is 2.8.0 or newer: parse the output of git config --system --show-origin --list -z
DFS block cache: harden against race over ref locks.
ssh: use a single SecureRandom instance for hashing hostnames
575393 Fix checkout of files with mixed line endings on text=auto eol=crlf
Don't rely on an implicit default character set. JEP 400 (Java 18) will change the default character set to UTF-8 unconditionally. Introduce SystemReader.getDefaultCharset() that provides the locale-dependent charset the way JEP 400 recommends.
DFS block cache: fix lock issue and support parallel index loading
JSch: fix service publication for ServiceLoader
Fix missing peel-part in lsRefsV2 for loose annotated tags
Implement RecordingLogger based on org.slf4j.Logger
Add 4.22 target platform for 2021-12
Update Orbit to R20211122181901 for 2021-12
Skip javadoc generation for test bundles.
Add missing .gitignore in o.e.j.ssh.apache.agent
[test] test OpenSshConfigFile directly, not via the JSch config
[releng] bazel: Enable errorprone on o.e.j.ssh.apache
[doc] Add README and package-info to the SSH bundles
Factor out parsing git-style size numbers to StringUtils
534731 Remove use of deprecated getAllRefs() in UploadPack
Upgrade plexus-compiler version to 2.9.0
Update tycho to 2.5.0 and target platform to jgit-4.17
Remove pack200 which is deprecated in Java 11 and isn't supported by tycho 2.5.0 anymore. It was specified in JSR 200 (J2SE 1.5), deprecated in JEP 336 (Java SE 11) and removed in JEP 367 (Java SE 14).
Update ecj to 3.27.0
Update errorprone to 2.9.0 and enable using it on java 16