Merge branch 'stable-5.11' into stable-5.12

* stable-5.11:
  [test] Create keystore with the keytool of the running JDK
  ReachabilityCheckerTestCase: fix reachable from self test case

Change-Id: Ie8db450a1fad05bddb812a55b2ceb03b2805403a
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
diff --git a/DEPENDENCIES b/DEPENDENCIES
index bffe3d9..9dbca62 100644
--- a/DEPENDENCIES
+++ b/DEPENDENCIES
@@ -12,8 +12,8 @@
 maven/mavencentral/net.bytebuddy/byte-buddy/1.9.0, Apache-2.0, approved, clearlydefined
 maven/mavencentral/net.i2p.crypto/eddsa/0.3.0, CC0, approved, CQ17804
 maven/mavencentral/net.sf.jopt-simple/jopt-simple/4.6, MIT, approved, clearlydefined
-maven/mavencentral/org.apache.ant/ant-launcher/1.10.8, Apache-2.0 AND W3C AND LicenseRef-Public-Domain, approved, CQ15560
-maven/mavencentral/org.apache.ant/ant/1.10.8, Apache-2.0 AND W3C AND LicenseRef-Public-Domain, approved, CQ15560
+maven/mavencentral/org.apache.ant/ant-launcher/1.10.10, Apache-2.0 AND W3C AND LicenseRef-Public-Domain, approved, CQ15560
+maven/mavencentral/org.apache.ant/ant/1.10.10, Apache-2.0 AND W3C AND LicenseRef-Public-Domain, approved, CQ15560
 maven/mavencentral/org.apache.commons/commons-compress/1.19, Apache-2.0, approved, clearlydefined
 maven/mavencentral/org.apache.commons/commons-math3/3.2, Apache-2.0, approved, clearlydefined
 maven/mavencentral/org.apache.httpcomponents/httpclient/4.5.13, Apache-2.0, approved, CQ22761
@@ -26,35 +26,35 @@
 maven/mavencentral/org.bouncycastle/bcpg-jdk15on/1.65, Apache-2.0, approved, CQ21975
 maven/mavencentral/org.bouncycastle/bcpkix-jdk15on/1.65, MIT AND LicenseRef-Public-Domain, approved, CQ21976
 maven/mavencentral/org.bouncycastle/bcprov-jdk15on/1.65.01, MIT AND LicenseRef-Public-Domain, approved, CQ21977
-maven/mavencentral/org.eclipse.jetty/jetty-http/9.4.36.v20210114, , approved, eclipse
-maven/mavencentral/org.eclipse.jetty/jetty-io/9.4.36.v20210114, , approved, eclipse
-maven/mavencentral/org.eclipse.jetty/jetty-security/9.4.36.v20210114, , approved, eclipse
-maven/mavencentral/org.eclipse.jetty/jetty-server/9.4.36.v20210114, , approved, eclipse
-maven/mavencentral/org.eclipse.jetty/jetty-servlet/9.4.36.v20210114, , approved, eclipse
-maven/mavencentral/org.eclipse.jetty/jetty-util-ajax/9.4.36.v20210114, , approved, eclipse
-maven/mavencentral/org.eclipse.jetty/jetty-util/9.4.36.v20210114, , approved, eclipse
-maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ant.test/5.11.0-SNAPSHOT, , approved, eclipse
-maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ant/5.11.0-SNAPSHOT, , approved, eclipse
-maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.archive/5.11.0-SNAPSHOT, , approved, eclipse
-maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.gpg.bc/5.11.0-SNAPSHOT, , approved, eclipse
-maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.http.apache/5.11.0-SNAPSHOT, , approved, eclipse
-maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.http.server/5.11.0-SNAPSHOT, , approved, eclipse
-maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.http.test/5.11.0-SNAPSHOT, , approved, eclipse
-maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.junit.http/5.11.0-SNAPSHOT, , approved, eclipse
-maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.junit.ssh/5.11.0-SNAPSHOT, , approved, eclipse
-maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.junit/5.11.0-SNAPSHOT, , approved, eclipse
-maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.lfs.server.test/5.11.0-SNAPSHOT, , approved, eclipse
-maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.lfs.server/5.11.0-SNAPSHOT, , approved, eclipse
-maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.lfs.test/5.11.0-SNAPSHOT, , approved, eclipse
-maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.lfs/5.11.0-SNAPSHOT, , approved, eclipse
-maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.pgm.test/5.11.0-SNAPSHOT, , approved, eclipse
-maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.pgm/5.11.0-SNAPSHOT, , approved, eclipse
-maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ssh.apache.test/5.11.0-SNAPSHOT, , approved, eclipse
-maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ssh.apache/5.11.0-SNAPSHOT, , approved, eclipse
-maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ssh.jsch/5.11.0-SNAPSHOT, , approved, eclipse
-maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.test/5.11.0-SNAPSHOT, , approved, eclipse
-maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ui/5.11.0-SNAPSHOT, , approved, eclipse
-maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit/5.11.0-SNAPSHOT, , approved, eclipse
+maven/mavencentral/org.eclipse.jetty/jetty-http/9.4.41.v20210516, , approved, eclipse
+maven/mavencentral/org.eclipse.jetty/jetty-io/9.4.41.v20210516, , approved, eclipse
+maven/mavencentral/org.eclipse.jetty/jetty-security/9.4.41.v20210516, , approved, eclipse
+maven/mavencentral/org.eclipse.jetty/jetty-server/9.4.41.v20210516, , approved, eclipse
+maven/mavencentral/org.eclipse.jetty/jetty-servlet/9.4.41.v20210516, , approved, eclipse
+maven/mavencentral/org.eclipse.jetty/jetty-util-ajax/9.4.41.v20210516, , approved, eclipse
+maven/mavencentral/org.eclipse.jetty/jetty-util/9.4.41.v20210516, , approved, eclipse
+maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ant.test/5.12.0-SNAPSHOT, , approved, eclipse
+maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ant/5.12.0-SNAPSHOT, , approved, eclipse
+maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.archive/5.12.0-SNAPSHOT, , approved, eclipse
+maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.gpg.bc/5.12.0-SNAPSHOT, , approved, eclipse
+maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.http.apache/5.12.0-SNAPSHOT, , approved, eclipse
+maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.http.server/5.12.0-SNAPSHOT, , approved, eclipse
+maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.http.test/5.12.0-SNAPSHOT, , approved, eclipse
+maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.junit.http/5.12.0-SNAPSHOT, , approved, eclipse
+maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.junit.ssh/5.12.0-SNAPSHOT, , approved, eclipse
+maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.junit/5.12.0-SNAPSHOT, , approved, eclipse
+maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.lfs.server.test/5.12.0-SNAPSHOT, , approved, eclipse
+maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.lfs.server/5.12.0-SNAPSHOT, , approved, eclipse
+maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.lfs.test/5.12.0-SNAPSHOT, , approved, eclipse
+maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.lfs/5.12.0-SNAPSHOT, , approved, eclipse
+maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.pgm.test/5.12.0-SNAPSHOT, , approved, eclipse
+maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.pgm/5.12.0-SNAPSHOT, , approved, eclipse
+maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ssh.apache.test/5.12.0-SNAPSHOT, , approved, eclipse
+maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ssh.apache/5.12.0-SNAPSHOT, , approved, eclipse
+maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ssh.jsch/5.12.0-SNAPSHOT, , approved, eclipse
+maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.test/5.12.0-SNAPSHOT, , approved, eclipse
+maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ui/5.12.0-SNAPSHOT, , approved, eclipse
+maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit/5.12.0-SNAPSHOT, , approved, eclipse
 maven/mavencentral/org.hamcrest/hamcrest-core/1.3, BSD-2-Clause, approved, CQ7063
 maven/mavencentral/org.mockito/mockito-core/2.23.0, MIT, approved, CQ17976
 maven/mavencentral/org.objenesis/objenesis/2.6, Apache-2.0, approved, CQ15478
diff --git a/Documentation/config-options.md b/Documentation/config-options.md
index d463551..a9ca48c 100644
--- a/Documentation/config-options.md
+++ b/Documentation/config-options.md
@@ -7,6 +7,8 @@
 | &#x2705; | option defined by native git |
 | &#x20DE; | jgit custom option not supported by native git |
 
+For details on native git options see also the official [git config documentation](https://git-scm.com/docs/git-config).
+
 ## __core__ options
 
 |  option | default | git option | description |
@@ -59,6 +61,24 @@
 | `gc.pruneExpire` | `2.weeks.ago` | &#x2705; | Grace period after which unreachable objects will be pruned. |
 | `gc.prunePackExpire` | `1.hour.ago` |  &#x20DE; | Grace period after which packfiles only containing unreachable objects will be pruned. |
 
+## __http__ options
+
+|  option | default | git option | description |
+|---------|---------|------------|-------------|
+| `http.cookieFile`| | &#x2705; | Absolute path (with tilde expansion) of a cookie file in Netscape format. |
+| `http.cookieFileCacheLimit`| 10 | &#x20DE; | JGit caches at most this number of the most recently used cookie files. |
+| `http.extraHeader`|  | &#x2705; | Extra HTTP header(s) to send with HTTP requests, in the format "`Key: Value`". May appear multiple times; an empty option clears the list. |
+| `http.followRedirects`| `initial` | &#x2705; | `true`, `false`, or `initial`. Whether to follow a redirect always, never, or only on the first HTTP request in a git remote operation. |
+| `http.maxRedirects`| 5 | &#x20DE; | Maximum number of redirects to follow; can be overridden via the Java system property `http.maxRedirects`. |
+| `http.postBuffer`| `1 MiB` | &#x2705; | Maximum size in bytes for single HTTP POST requests; for larger requests, HTTP 1.1 chunked transfer is used. |
+| `http.saveCookies`| `false` | &#x2705; | Boolean; if `true` and `http.cookieFile` is set, save received cookies. |
+| `http.sslVerify`| `true` | &#x2705; | Boolean; whether to check SSL certificates in HTTPS connections. |
+| `http.userAgent`| | &#x2705; | User-agent string to send with HTTP requests. Must be 7bit-ASCII. Can be overridden via environment variable `GIT_HTTP_USER_AGENT`. |
+
+All `http.*` options can also be specified in a URL-specific way using the format `http.<url>.*`. See the official [git config documentation](https://git-scm.com/docs/git-config#Documentation/git-config.txt-httplturlgt) for details.
+
+Proxy configuration uses the standard Java mechanisms via class `java.net.ProxySelector`.
+
 ## __pack__ options
 
 |  option | default | git option | description |
diff --git a/WORKSPACE b/WORKSPACE
index 224968a..d9c407a 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -237,55 +237,55 @@
     sha1 = "9180733b7df8542621dc12e21e87557e8c99b8cb",
 )
 
-JETTY_VER = "9.4.36.v20210114"
+JETTY_VER = "9.4.41.v20210516"
 
 maven_jar(
     name = "jetty-servlet",
     artifact = "org.eclipse.jetty:jetty-servlet:" + JETTY_VER,
-    sha1 = "b189e52a5ee55ae172e4e99e29c5c314f5daf4b9",
-    src_sha1 = "3a0fa449772ab0d76625f6afb81f60c32a490613",
+    sha1 = "ea45368ea7fd04026038f89e6910f17f70939641",
+    src_sha1 = "4acf6b0d1449ccd39b195783e3639ab0da51f7bf",
 )
 
 maven_jar(
     name = "jetty-security",
     artifact = "org.eclipse.jetty:jetty-security:" + JETTY_VER,
-    sha1 = "42030d6ed7dfc0f75818cde0adcf738efc477574",
-    src_sha1 = "612220a97d45fad3983ccc56b0cb9a271f3fd003",
+    sha1 = "5ba69b1189a9d1f425ed03cbc2c901e0e6023c4d",
+    src_sha1 = "d46f8cb4dad66751d3a588309c6bbc15b80fbad4",
 )
 
 maven_jar(
     name = "jetty-server",
     artifact = "org.eclipse.jetty:jetty-server:" + JETTY_VER,
-    sha1 = "88a7d342974aadca658e7386e8d0fcc5c0788f41",
-    src_sha1 = "4552c0c6db2948e8557db477b6b48d291006e481",
+    sha1 = "25b1963b0a1c56202ec37046adc55861815107ce",
+    src_sha1 = "a7f82c9df737316cf0dfafe4a33ca4ae89d780db",
 )
 
 maven_jar(
     name = "jetty-http",
     artifact = "org.eclipse.jetty:jetty-http:" + JETTY_VER,
-    sha1 = "1eee89a55e04ff94df0f85d95200fc48acb43d86",
-    src_sha1 = "552a784ec789c7ba581c5341ae6d8b6353ed5ace",
+    sha1 = "0d460bece4dd9666b46cbd18f8d7fd31cf02ecd9",
+    src_sha1 = "6fa009d950b8fdab8e94003e6295c08d42ee85b7",
 )
 
 maven_jar(
     name = "jetty-io",
     artifact = "org.eclipse.jetty:jetty-io:" + JETTY_VER,
-    sha1 = "84a8faf9031eb45a5a2ddb7681e22c483d81ab3a",
-    src_sha1 = "72d5fc6d909e28f8720394b25babda80805a46b9",
+    sha1 = "820eea368623939c2113902b1ca7a98186f64a73",
+    src_sha1 = "4373285dafb5f79210815d9c15de106cc3e9ac4d",
 )
 
 maven_jar(
     name = "jetty-util",
     artifact = "org.eclipse.jetty:jetty-util:" + JETTY_VER,
-    sha1 = "925257fbcca6b501a25252c7447dbedb021f7404",
-    src_sha1 = "532e8b66044f4e58ca5da3aec19f02a2f3c16ddd",
+    sha1 = "548c76ea00d7eb3e2bcea273174e5d030639d109",
+    src_sha1 = "ba188de552a0c310f69cf12bea887413ce8f0e78",
 )
 
 maven_jar(
     name = "jetty-util-ajax",
     artifact = "org.eclipse.jetty:jetty-util-ajax:" + JETTY_VER,
-    sha1 = "2f478130c21787073facb64d7242e06f94980c60",
-    src_sha1 = "7153d7ca38878d971fd90992c303bb7719ba7a21",
+    sha1 = "d4c1d66fc62796a17548e6c344fbf89b5889f873",
+    src_sha1 = "b60cf77be68137eee4ee13d83c47d684d14b6d90",
 )
 
 BOUNCYCASTLE_VER = "1.65"
diff --git a/lib/BUILD b/lib/BUILD
index 8ad49d4..83709a3 100644
--- a/lib/BUILD
+++ b/lib/BUILD
@@ -161,8 +161,8 @@
     visibility = [
         "//org.eclipse.jgit:__pkg__",
         "//org.eclipse.jgit.gpg.bc:__pkg__",
-        "//org.eclipse.jgit.test:__pkg__",
         "//org.eclipse.jgit.gpg.bc.test:__pkg__",
+        "//org.eclipse.jgit.test:__pkg__",
     ],
     exports = ["@bcpg//jar"],
 )
@@ -172,8 +172,8 @@
     visibility = [
         "//org.eclipse.jgit:__pkg__",
         "//org.eclipse.jgit.gpg.bc:__pkg__",
-        "//org.eclipse.jgit.test:__pkg__",
         "//org.eclipse.jgit.gpg.bc.test:__pkg__",
+        "//org.eclipse.jgit.test:__pkg__",
     ],
     exports = ["@bcprov//jar"],
 )
diff --git a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF
index e0d802e..75451de 100644
--- a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF
@@ -5,13 +5,13 @@
 Automatic-Module-Name: org.eclipse.jgit.ant.test
 Bundle-SymbolicName: org.eclipse.jgit.ant.test
 Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Import-Package: org.apache.tools.ant,
- org.eclipse.jgit.ant.tasks;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.junit;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lib;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util;version="[5.11.2,5.12.0)",
+ org.eclipse.jgit.ant.tasks;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.junit;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lib;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util;version="[5.12.1,5.13.0)",
  org.hamcrest.core;version="[1.1.0,2.0.0)",
  org.junit;version="[4.13,5.0.0)"
diff --git a/org.eclipse.jgit.ant.test/pom.xml b/org.eclipse.jgit.ant.test/pom.xml
index 155e763..b318fae 100644
--- a/org.eclipse.jgit.ant.test/pom.xml
+++ b/org.eclipse.jgit.ant.test/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.ant.test</artifactId>
diff --git a/org.eclipse.jgit.ant/META-INF/MANIFEST.MF b/org.eclipse.jgit.ant/META-INF/MANIFEST.MF
index f3ecc34..ce257c3 100644
--- a/org.eclipse.jgit.ant/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ant/META-INF/MANIFEST.MF
@@ -3,13 +3,13 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.ant
 Bundle-SymbolicName: org.eclipse.jgit.ant
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Import-Package: org.apache.tools.ant,
-  org.eclipse.jgit.storage.file;version="[5.11.2,5.12.0)"
+  org.eclipse.jgit.storage.file;version="[5.12.1,5.13.0)"
 Bundle-Localization: plugin
 Bundle-Vendor: %Bundle-Vendor
-Export-Package: org.eclipse.jgit.ant;version="5.11.2",
- org.eclipse.jgit.ant.tasks;version="5.11.2";
+Export-Package: org.eclipse.jgit.ant;version="5.12.1",
+ org.eclipse.jgit.ant.tasks;version="5.12.1";
   uses:="org.apache.tools.ant,
    org.apache.tools.ant.types"
diff --git a/org.eclipse.jgit.ant/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.ant/META-INF/SOURCE-MANIFEST.MF
index 4ed9bc0..9d9ad0c 100644
--- a/org.eclipse.jgit.ant/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.ant/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@
 Bundle-Name: org.eclipse.jgit.ant - Sources
 Bundle-SymbolicName: org.eclipse.jgit.ant.source
 Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.11.2.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.ant;version="5.11.2.qualifier";roots="."
+Bundle-Version: 5.12.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.ant;version="5.12.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.ant/pom.xml b/org.eclipse.jgit.ant/pom.xml
index 0ef0f28..4e4a041 100644
--- a/org.eclipse.jgit.ant/pom.xml
+++ b/org.eclipse.jgit.ant/pom.xml
@@ -15,7 +15,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.ant</artifactId>
@@ -38,7 +38,7 @@
     <dependency>
       <groupId>org.apache.ant</groupId>
       <artifactId>ant</artifactId>
-      <version>1.10.8</version>
+      <version>1.10.10</version>
     </dependency>
   </dependencies>
 
diff --git a/org.eclipse.jgit.archive/.settings/.api_filters b/org.eclipse.jgit.archive/.settings/.api_filters
deleted file mode 100644
index f4a934a..0000000
--- a/org.eclipse.jgit.archive/.settings/.api_filters
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.jgit.archive" version="2">
-    <resource path="src/org/eclipse/jgit/archive/BaseFormat.java" type="org.eclipse.jgit.archive.BaseFormat">
-        <filter id="336658481">
-            <message_arguments>
-                <message_argument value="org.eclipse.jgit.archive.BaseFormat"/>
-                <message_argument value="COMPRESSION_LEVEL"/>
-            </message_arguments>
-        </filter>
-    </resource>
-</component>
diff --git a/org.eclipse.jgit.archive/META-INF/MANIFEST.MF b/org.eclipse.jgit.archive/META-INF/MANIFEST.MF
index a772db1..3c9e551 100644
--- a/org.eclipse.jgit.archive/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.archive/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.archive
 Bundle-SymbolicName: org.eclipse.jgit.archive
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
@@ -13,17 +13,17 @@
  org.apache.commons.compress.compressors.bzip2;version="[1.4,2.0)",
  org.apache.commons.compress.compressors.gzip;version="[1.4,2.0)",
  org.apache.commons.compress.compressors.xz;version="[1.4,2.0)",
- org.eclipse.jgit.api;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lib;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.nls;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.revwalk;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util;version="[5.11.2,5.12.0)",
+ org.eclipse.jgit.api;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lib;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.nls;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.revwalk;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util;version="[5.12.1,5.13.0)",
  org.osgi.framework;version="[1.3.0,2.0.0)"
 Bundle-ActivationPolicy: lazy
 Bundle-Activator: org.eclipse.jgit.archive.FormatActivator
-Export-Package: org.eclipse.jgit.archive;version="5.11.2";
+Export-Package: org.eclipse.jgit.archive;version="5.12.1";
   uses:="org.eclipse.jgit.lib,
    org.eclipse.jgit.api,
    org.apache.commons.compress.archivers,
    org.osgi.framework",
- org.eclipse.jgit.archive.internal;version="5.11.2";x-internal:=true
+ org.eclipse.jgit.archive.internal;version="5.12.1";x-internal:=true
diff --git a/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF
index 749a21e..54a18ec 100644
--- a/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.archive/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@
 Bundle-Name: org.eclipse.jgit.archive - Sources
 Bundle-SymbolicName: org.eclipse.jgit.archive.source
 Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.11.2.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.archive;version="5.11.2.qualifier";roots="."
+Bundle-Version: 5.12.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.archive;version="5.12.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.archive/pom.xml b/org.eclipse.jgit.archive/pom.xml
index 6cb8675..b67af49 100644
--- a/org.eclipse.jgit.archive/pom.xml
+++ b/org.eclipse.jgit.archive/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.archive</artifactId>
diff --git a/org.eclipse.jgit.benchmarks/pom.xml b/org.eclipse.jgit.benchmarks/pom.xml
index e26ac30..dd4b4a9 100644
--- a/org.eclipse.jgit.benchmarks/pom.xml
+++ b/org.eclipse.jgit.benchmarks/pom.xml
@@ -14,7 +14,7 @@
   <modelVersion>4.0.0</modelVersion>
 
   <groupId>org.eclipse.jgit</groupId>
-  <version>5.11.2-SNAPSHOT</version>
+  <version>5.12.1-SNAPSHOT</version>
   <artifactId>org.eclipse.jgit.benchmarks</artifactId>
   <packaging>jar</packaging>
 
@@ -148,7 +148,7 @@
             <dependency><!-- add support for ssh/scp -->
               <groupId>org.apache.maven.wagon</groupId>
               <artifactId>wagon-ssh</artifactId>
-              <version>3.4.2</version>
+              <version>3.4.3</version>
             </dependency>
           </dependencies>
         </plugin>
@@ -165,7 +165,7 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-project-info-reports-plugin</artifactId>
-          <version>3.1.1</version>
+          <version>3.1.2</version>
         </plugin>
       </plugins>
     </pluginManagement>
diff --git a/org.eclipse.jgit.coverage/pom.xml b/org.eclipse.jgit.coverage/pom.xml
index 6b02158..c84b8f3 100644
--- a/org.eclipse.jgit.coverage/pom.xml
+++ b/org.eclipse.jgit.coverage/pom.xml
@@ -14,7 +14,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
 
@@ -27,88 +27,88 @@
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit</artifactId>
-      <version>5.11.2-SNAPSHOT</version>
+      <version>5.12.1-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.ant</artifactId>
-      <version>5.11.2-SNAPSHOT</version>
+      <version>5.12.1-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.archive</artifactId>
-      <version>5.11.2-SNAPSHOT</version>
+      <version>5.12.1-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.http.apache</artifactId>
-      <version>5.11.2-SNAPSHOT</version>
+      <version>5.12.1-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.http.server</artifactId>
-      <version>5.11.2-SNAPSHOT</version>
+      <version>5.12.1-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.lfs</artifactId>
-      <version>5.11.2-SNAPSHOT</version>
+      <version>5.12.1-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.lfs.server</artifactId>
-      <version>5.11.2-SNAPSHOT</version>
+      <version>5.12.1-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.pgm</artifactId>
-      <version>5.11.2-SNAPSHOT</version>
+      <version>5.12.1-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.ui</artifactId>
-      <version>5.11.2-SNAPSHOT</version>
+      <version>5.12.1-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.ssh.apache</artifactId>
-      <version>5.11.2-SNAPSHOT</version>
+      <version>5.12.1-SNAPSHOT</version>
     </dependency>
 
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.test</artifactId>
-      <version>5.11.2-SNAPSHOT</version>
+      <version>5.12.1-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.ant.test</artifactId>
-      <version>5.11.2-SNAPSHOT</version>
+      <version>5.12.1-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.http.test</artifactId>
-      <version>5.11.2-SNAPSHOT</version>
+      <version>5.12.1-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.pgm.test</artifactId>
-      <version>5.11.2-SNAPSHOT</version>
+      <version>5.12.1-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.lfs.test</artifactId>
-      <version>5.11.2-SNAPSHOT</version>
+      <version>5.12.1-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.lfs.server.test</artifactId>
-      <version>5.11.2-SNAPSHOT</version>
+      <version>5.12.1-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.ssh.apache.test</artifactId>
-      <version>5.11.2-SNAPSHOT</version>
+      <version>5.12.1-SNAPSHOT</version>
     </dependency>
   </dependencies>
 
diff --git a/org.eclipse.jgit.gpg.bc.test/BUILD b/org.eclipse.jgit.gpg.bc.test/BUILD
index 925536e..4c86eff 100644
--- a/org.eclipse.jgit.gpg.bc.test/BUILD
+++ b/org.eclipse.jgit.gpg.bc.test/BUILD
@@ -2,7 +2,6 @@
     "@com_googlesource_gerrit_bazlets//tools:genrule2.bzl",
     "genrule2",
 )
-load("@rules_java//java:defs.bzl", "java_import")
 load(
     "@com_googlesource_gerrit_bazlets//tools:junit.bzl",
     "junit_tests",
@@ -11,25 +10,20 @@
 junit_tests(
     name = "bc",
     srcs = glob(["tst/**/*.java"]),
+    resource_jars = [":tst_rsrc"],
     tags = ["bc"],
     deps = [
         "//lib:bcpg",
         "//lib:bcprov",
         "//lib:junit",
-        "//org.eclipse.jgit:jgit",
         "//org.eclipse.jgit.gpg.bc:gpg-bc",
-        "//org.eclipse.jgit.gpg.bc.test:tst_rsrc",
+        "//org.eclipse.jgit:jgit",
     ],
 )
 
-java_import(
-    name = "tst_rsrc",
-    jars = [":tst_rsrc_jar"],
-)
-
 genrule2(
-    name = "tst_rsrc_jar",
+    name = "tst_rsrc",
     srcs = glob(["tst-rsrc/**"]),
     outs = ["tst_rsrc.jar"],
-    cmd = "o=$$PWD/$@ && tar cf - $(SRCS) | tar -C $$TMP --strip-components=2 -xf - && cd  $$TMP && zip -qr $$o .",
+    cmd = "tar cf - $(SRCS) | tar -C $$TMP --strip-components=2 -xf - && cd $$TMP && zip -qr $$ROOT/$@ .",
 )
diff --git a/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF
index 0a121a7..0c9cee3 100644
--- a/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.gpg.bc.test
 Bundle-SymbolicName: org.eclipse.jgit.gpg.bc.test
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
@@ -12,9 +12,9 @@
  org.bouncycastle.openpgp.operator;version="[1.65.0,2.0.0)",
  org.bouncycastle.openpgp.operator.jcajce;version="[1.65.0,2.0.0)",
  org.bouncycastle.util.encoders;version="[1.65.0,2.0.0)",
- org.eclipse.jgit.gpg.bc.internal;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.gpg.bc.internal.keys;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util.sha1;version="[5.11.2,5.12.0)",
+ org.eclipse.jgit.gpg.bc.internal;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.gpg.bc.internal.keys;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util.sha1;version="[5.12.1,5.13.0)",
  org.junit;version="[4.13,5.0.0)",
  org.junit.runner;version="[4.13,5.0.0)",
  org.junit.runners;version="[4.13,5.0.0)"
diff --git a/org.eclipse.jgit.gpg.bc.test/pom.xml b/org.eclipse.jgit.gpg.bc.test/pom.xml
index 08966f8..6ecbc00 100644
--- a/org.eclipse.jgit.gpg.bc.test/pom.xml
+++ b/org.eclipse.jgit.gpg.bc.test/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.gpg.bc.test</artifactId>
diff --git a/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF b/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF
index 3fbdb2a..f1854b0 100644
--- a/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF
@@ -3,10 +3,10 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.gpg.bc
 Bundle-SymbolicName: org.eclipse.jgit.gpg.bc;singleton:=true
-Fragment-Host: org.eclipse.jgit;bundle-version="[5.11.2,5.12.0)"
+Fragment-Host: org.eclipse.jgit;bundle-version="[5.12.1,5.13.0)"
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Import-Package: org.bouncycastle.asn1;version="[1.65.0,2.0.0)",
  org.bouncycastle.asn1.cryptlib;version="[1.65.0,2.0.0)",
@@ -29,9 +29,9 @@
  org.bouncycastle.util;version="[1.65.0,2.0.0)",
  org.bouncycastle.util.encoders;version="[1.65.0,2.0.0)",
  org.bouncycastle.util.io;version="[1.65.0,2.0.0)",
- org.eclipse.jgit.annotations;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.api.errors;version="[5.11.2,5.12.0)",
+ org.eclipse.jgit.annotations;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.api.errors;version="[5.12.1,5.13.0)",
  org.slf4j;version="[1.7.0,2.0.0)"
-Export-Package: org.eclipse.jgit.gpg.bc;version="5.11.2",
- org.eclipse.jgit.gpg.bc.internal;version="5.11.2";x-friends:="org.eclipse.jgit.gpg.bc.test",
- org.eclipse.jgit.gpg.bc.internal.keys;version="5.11.2";x-friends:="org.eclipse.jgit.gpg.bc.test"
+Export-Package: org.eclipse.jgit.gpg.bc;version="5.12.1",
+ org.eclipse.jgit.gpg.bc.internal;version="5.12.1";x-friends:="org.eclipse.jgit.gpg.bc.test",
+ org.eclipse.jgit.gpg.bc.internal.keys;version="5.12.1";x-friends:="org.eclipse.jgit.gpg.bc.test"
diff --git a/org.eclipse.jgit.gpg.bc/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.gpg.bc/META-INF/SOURCE-MANIFEST.MF
index dde429d..cd000ba 100644
--- a/org.eclipse.jgit.gpg.bc/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.gpg.bc/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@
 Bundle-Name: org.eclipse.jgit.gpg.bc - Sources
 Bundle-SymbolicName: org.eclipse.jgit.gpg.bc.source
 Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.11.2.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.gpg.bc;version="5.11.2.qualifier";roots="."
+Bundle-Version: 5.12.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.gpg.bc;version="5.12.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.gpg.bc/pom.xml b/org.eclipse.jgit.gpg.bc/pom.xml
index c8d4ac5..8c78f6e 100644
--- a/org.eclipse.jgit.gpg.bc/pom.xml
+++ b/org.eclipse.jgit.gpg.bc/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.gpg.bc</artifactId>
diff --git a/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF
index f2bed8d..69799a9 100644
--- a/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.http.apache/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.http.apache
 Bundle-SymbolicName: org.eclipse.jgit.http.apache
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Bundle-Localization: plugin
 Bundle-Vendor: %Bundle-Vendor
@@ -25,11 +25,11 @@
  org.apache.http.impl.conn;version="[4.4.0,5.0.0)",
  org.apache.http.params;version="[4.3.0,5.0.0)",
  org.apache.http.ssl;version="[4.3.0,5.0.0)",
- org.eclipse.jgit.annotations;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.nls;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport.http;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util;version="[5.11.2,5.12.0)"
-Export-Package: org.eclipse.jgit.transport.http.apache;version="5.11.2";
+ org.eclipse.jgit.annotations;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.nls;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport.http;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util;version="[5.12.1,5.13.0)"
+Export-Package: org.eclipse.jgit.transport.http.apache;version="5.12.1";
   uses:="org.apache.http.client,
    org.eclipse.jgit.transport.http,
    org.apache.http.entity,
diff --git a/org.eclipse.jgit.http.apache/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.http.apache/META-INF/SOURCE-MANIFEST.MF
index 9ca1e9b..0210cf6 100644
--- a/org.eclipse.jgit.http.apache/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.http.apache/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@
 Bundle-Name: org.eclipse.jgit.http.apache - Sources
 Bundle-SymbolicName: org.eclipse.jgit.http.apache.source
 Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.11.2.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.http.apache;version="5.11.2.qualifier";roots="."
+Bundle-Version: 5.12.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.http.apache;version="5.12.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.http.apache/pom.xml b/org.eclipse.jgit.http.apache/pom.xml
index 631859e..b3fb85d 100644
--- a/org.eclipse.jgit.http.apache/pom.xml
+++ b/org.eclipse.jgit.http.apache/pom.xml
@@ -15,7 +15,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.http.apache</artifactId>
diff --git a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF
index 8b418d4..c20a9e0 100644
--- a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF
@@ -3,13 +3,13 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.http.server
 Bundle-SymbolicName: org.eclipse.jgit.http.server
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
 Bundle-Localization: plugin
 Bundle-Vendor: %Bundle-Vendor
-Export-Package: org.eclipse.jgit.http.server;version="5.11.2",
- org.eclipse.jgit.http.server.glue;version="5.11.2";
+Export-Package: org.eclipse.jgit.http.server;version="5.12.1",
+ org.eclipse.jgit.http.server.glue;version="5.12.1";
   uses:="javax.servlet,javax.servlet.http",
- org.eclipse.jgit.http.server.resolver;version="5.11.2";
+ org.eclipse.jgit.http.server.resolver;version="5.12.1";
   uses:="org.eclipse.jgit.transport.resolver,
    org.eclipse.jgit.lib,
    org.eclipse.jgit.transport,
@@ -18,14 +18,14 @@
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Import-Package: javax.servlet;version="[2.5.0,3.2.0)",
  javax.servlet.http;version="[2.5.0,3.2.0)",
- org.eclipse.jgit.annotations;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.errors;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.storage.dfs;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.transport.parser;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lib;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.nls;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.revwalk;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport.resolver;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util;version="[5.11.2,5.12.0)"
+ org.eclipse.jgit.annotations;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.errors;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.storage.dfs;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.transport.parser;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lib;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.nls;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.revwalk;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport.resolver;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util;version="[5.12.1,5.13.0)"
diff --git a/org.eclipse.jgit.http.server/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.http.server/META-INF/SOURCE-MANIFEST.MF
index fbbde74..856f91e 100644
--- a/org.eclipse.jgit.http.server/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.http.server/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@
 Bundle-Name: org.eclipse.jgit.http.server - Sources
 Bundle-SymbolicName: org.eclipse.jgit.http.server.source
 Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.11.2.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.http.server;version="5.11.2.qualifier";roots="."
+Bundle-Version: 5.12.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.http.server;version="5.12.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.http.server/pom.xml b/org.eclipse.jgit.http.server/pom.xml
index 2094f04..f142173 100644
--- a/org.eclipse.jgit.http.server/pom.xml
+++ b/org.eclipse.jgit.http.server/pom.xml
@@ -19,7 +19,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.http.server</artifactId>
@@ -126,6 +126,7 @@
                       <groupId>${project.groupId}</groupId>
                       <artifactId>${project.artifactId}</artifactId>
                       <version>${jgit-last-release-version}</version>
+                      <type>jar</type>
                   </dependency>
               </oldVersion>
               <newVersion>
@@ -143,7 +144,7 @@
                   <breakBuildOnBinaryIncompatibleModifications>false</breakBuildOnBinaryIncompatibleModifications>
                   <onlyBinaryIncompatible>false</onlyBinaryIncompatible>
                   <includeSynthetic>false</includeSynthetic>
-                  <ignoreMissingClasses>false</ignoreMissingClasses>
+                  <ignoreMissingClasses>true</ignoreMissingClasses>
                   <skipPomModules>true</skipPomModules>
               </parameter>
               <skip>false</skip>
diff --git a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF
index c700271..b8a653d 100644
--- a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.http.test
 Bundle-SymbolicName: org.eclipse.jgit.http.test
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
@@ -28,26 +28,26 @@
  org.eclipse.jetty.util.log;version="[9.4.5,10.0.0)",
  org.eclipse.jetty.util.security;version="[9.4.5,10.0.0)",
  org.eclipse.jetty.util.thread;version="[9.4.5,10.0.0)",
- org.eclipse.jgit.api;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.errors;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.http.server;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.http.server.glue;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.http.server.resolver;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.storage.dfs;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.storage.reftable;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.junit;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.junit.http;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lib;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.nls;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.revwalk;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.storage.file;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport.http;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport.http.apache;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport.resolver;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util;version="[5.11.2,5.12.0)",
+ org.eclipse.jgit.api;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.errors;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.http.server;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.http.server.glue;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.http.server.resolver;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.storage.dfs;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.storage.reftable;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.junit;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.junit.http;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lib;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.nls;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.revwalk;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.storage.file;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport.http;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport.http.apache;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport.resolver;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util;version="[5.12.1,5.13.0)",
  org.hamcrest;version="[1.1.0,2.0.0)",
  org.hamcrest.core;version="[1.1.0,2.0.0)",
  org.junit;version="[4.13,5.0.0)",
diff --git a/org.eclipse.jgit.http.test/pom.xml b/org.eclipse.jgit.http.test/pom.xml
index 2985051..67b4012 100644
--- a/org.eclipse.jgit.http.test/pom.xml
+++ b/org.eclipse.jgit.http.test/pom.xml
@@ -18,7 +18,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.http.test</artifactId>
diff --git a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF
index b6c2cb5..b5e6ff3 100644
--- a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.junit.http
 Bundle-SymbolicName: org.eclipse.jgit.junit.http
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
 Bundle-Localization: plugin
 Bundle-Vendor: %Bundle-Vendor
 Bundle-ActivationPolicy: lazy
@@ -22,16 +22,16 @@
  org.eclipse.jetty.util.log;version="[9.4.5,10.0.0)",
  org.eclipse.jetty.util.security;version="[9.4.5,10.0.0)",
  org.eclipse.jetty.util.ssl;version="[9.4.5,10.0.0)",
- org.eclipse.jgit.errors;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.http.server;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.junit;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lib;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.revwalk;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport.resolver;version="[5.11.2,5.12.0)",
+ org.eclipse.jgit.errors;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.http.server;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.junit;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lib;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.revwalk;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport.resolver;version="[5.12.1,5.13.0)",
  org.junit;version="[4.13,5.0.0)"
-Export-Package: org.eclipse.jgit.junit.http;version="5.11.2";
+Export-Package: org.eclipse.jgit.junit.http;version="5.12.1";
   uses:="org.eclipse.jgit.transport,
    org.eclipse.jgit.junit,
    javax.servlet.http,
diff --git a/org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF
index 199e982..d9204d3 100644
--- a/org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@
 Bundle-Name: org.eclipse.jgit.junit.http - Sources
 Bundle-SymbolicName: org.eclipse.jgit.junit.http.source
 Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.11.2.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.junit.http;version="5.11.2.qualifier";roots="."
+Bundle-Version: 5.12.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.junit.http;version="5.12.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.junit.http/pom.xml b/org.eclipse.jgit.junit.http/pom.xml
index eb008b0..b155ff3 100644
--- a/org.eclipse.jgit.junit.http/pom.xml
+++ b/org.eclipse.jgit.junit.http/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.junit.http</artifactId>
diff --git a/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF
index 13aa093..b777174 100644
--- a/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.junit.ssh
 Bundle-SymbolicName: org.eclipse.jgit.junit.ssh
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
 Bundle-Localization: plugin
 Bundle-Vendor: %Bundle-Vendor
 Bundle-ActivationPolicy: lazy
@@ -33,16 +33,16 @@
  org.apache.sshd.server.subsystem;version="[2.6.0,2.7.0)",
  org.apache.sshd.sftp;version="[2.6.0,2.7.0)",
  org.apache.sshd.sftp.server;version="[2.6.0,2.7.0)",
- org.eclipse.jgit.annotations;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.api;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.api.errors;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.errors;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.junit;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lib;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.revwalk;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util;version="[5.11.2,5.12.0)",
+ org.eclipse.jgit.annotations;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.api;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.api.errors;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.errors;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.junit;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lib;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.revwalk;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util;version="[5.12.1,5.13.0)",
  org.junit;version="[4.13,5.0.0)",
  org.junit.experimental.theories;version="[4.13,5.0.0)",
  org.slf4j;version="[1.7.0,2.0.0)"
-Export-Package: org.eclipse.jgit.junit.ssh;version="5.11.2"
+Export-Package: org.eclipse.jgit.junit.ssh;version="5.12.1"
diff --git a/org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF
index b2d2d89..eb562a0 100644
--- a/org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.junit.ssh/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@
 Bundle-Name: org.eclipse.jgit.junit.ssh - Sources
 Bundle-SymbolicName: org.eclipse.jgit.junit.ssh.source
 Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.11.2.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.junit.ssh;version="5.11.2.qualifier";roots="."
+Bundle-Version: 5.12.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.junit.ssh;version="5.12.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.junit.ssh/pom.xml b/org.eclipse.jgit.junit.ssh/pom.xml
index a1fd542..efec573 100644
--- a/org.eclipse.jgit.junit.ssh/pom.xml
+++ b/org.eclipse.jgit.junit.ssh/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.junit.ssh</artifactId>
diff --git a/org.eclipse.jgit.junit/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit/META-INF/MANIFEST.MF
index f2f2e16..fa61ce2 100644
--- a/org.eclipse.jgit.junit/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.junit/META-INF/MANIFEST.MF
@@ -3,35 +3,35 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.junit
 Bundle-SymbolicName: org.eclipse.jgit.junit
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
 Bundle-Localization: plugin
 Bundle-Vendor: %Bundle-Vendor
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Import-Package: org.eclipse.jgit.annotations;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.api;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.api.errors;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.dircache;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.errors;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.storage.pack;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lib;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.merge;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.revwalk;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.storage.file;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport;version="5.11.2",
- org.eclipse.jgit.treewalk;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.treewalk.filter;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util.io;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util.time;version="[5.11.2,5.12.0)",
+Import-Package: org.eclipse.jgit.annotations;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.api;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.api.errors;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.dircache;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.errors;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.storage.pack;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lib;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.merge;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.revwalk;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.storage.file;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport;version="5.12.1",
+ org.eclipse.jgit.treewalk;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.treewalk.filter;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util.io;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util.time;version="[5.12.1,5.13.0)",
  org.junit;version="[4.13,5.0.0)",
  org.junit.rules;version="[4.13,5.0.0)",
  org.junit.runner;version="[4.13,5.0.0)",
  org.junit.runners;version="[4.13,5.0.0)",
  org.junit.runners.model;version="[4.13,5.0.0)",
  org.slf4j;version="[1.7.0,2.0.0)"
-Export-Package: org.eclipse.jgit.junit;version="5.11.2";
+Export-Package: org.eclipse.jgit.junit;version="5.12.1";
   uses:="org.eclipse.jgit.dircache,
    org.eclipse.jgit.lib,
    org.eclipse.jgit.revwalk,
@@ -44,4 +44,4 @@
    org.junit.runners.model,
    org.junit.runner,
    org.eclipse.jgit.util.time",
- org.eclipse.jgit.junit.time;version="5.11.2";uses:="org.eclipse.jgit.util.time"
+ org.eclipse.jgit.junit.time;version="5.12.1";uses:="org.eclipse.jgit.util.time"
diff --git a/org.eclipse.jgit.junit/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.junit/META-INF/SOURCE-MANIFEST.MF
index b358c38..a4b46e4 100644
--- a/org.eclipse.jgit.junit/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.junit/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@
 Bundle-Name: org.eclipse.jgit.junit - Sources
 Bundle-SymbolicName: org.eclipse.jgit.junit.source
 Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.11.2.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.junit;version="5.11.2.qualifier";roots="."
+Bundle-Version: 5.12.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.junit;version="5.12.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.junit/pom.xml b/org.eclipse.jgit.junit/pom.xml
index eb65596..884abf0 100644
--- a/org.eclipse.jgit.junit/pom.xml
+++ b/org.eclipse.jgit.junit/pom.xml
@@ -19,7 +19,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.junit</artifactId>
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java
index 64556ac..5622108 100644
--- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java
+++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java
@@ -25,6 +25,7 @@
 import java.io.Reader;
 import java.nio.file.Path;
 import java.time.Instant;
+import java.util.List;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
@@ -39,6 +40,7 @@
 import org.eclipse.jgit.lib.FileMode;
 import org.eclipse.jgit.lib.ObjectId;
 import org.eclipse.jgit.lib.ObjectInserter;
+import org.eclipse.jgit.lib.Ref;
 import org.eclipse.jgit.lib.RefUpdate;
 import org.eclipse.jgit.lib.Repository;
 import org.eclipse.jgit.revwalk.RevCommit;
@@ -386,6 +388,16 @@
 	}
 
 	/**
+	 * Get all Refs
+	 *
+	 * @return list of refs
+	 * @throws IOException
+	 */
+	public List<Ref> getRefs() throws IOException {
+		return db.getRefDatabase().getRefs();
+	}
+
+	/**
 	 * Checkout a branch
 	 *
 	 * @param branchName
diff --git a/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF
index d757e45..296ff9e 100644
--- a/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.lfs.server.test
 Bundle-SymbolicName: org.eclipse.jgit.lfs.server.test
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
@@ -28,24 +28,24 @@
  org.eclipse.jetty.util.log;version="[9.4.5,10.0.0)",
  org.eclipse.jetty.util.security;version="[9.4.5,10.0.0)",
  org.eclipse.jetty.util.thread;version="[9.4.5,10.0.0)",
- org.eclipse.jgit.api;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.api.errors;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.junit;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.junit.http;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lfs;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lfs.errors;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lfs.lib;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lfs.server;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lfs.server.fs;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lfs.test;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lib;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.revwalk;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.storage.file;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.treewalk;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.treewalk.filter;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util;version="[5.11.2,5.12.0)",
+ org.eclipse.jgit.api;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.api.errors;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.junit;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.junit.http;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lfs;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lfs.errors;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lfs.lib;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lfs.server;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lfs.server.fs;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lfs.test;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lib;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.revwalk;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.storage.file;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.treewalk;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.treewalk.filter;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util;version="[5.12.1,5.13.0)",
  org.hamcrest.core;version="[1.1.0,2.0.0)",
  org.junit;version="[4.13,5.0.0)",
  org.junit.rules;version="[4.13,5.0.0)",
diff --git a/org.eclipse.jgit.lfs.server.test/pom.xml b/org.eclipse.jgit.lfs.server.test/pom.xml
index 4d6a76a..318f74e 100644
--- a/org.eclipse.jgit.lfs.server.test/pom.xml
+++ b/org.eclipse.jgit.lfs.server.test/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.lfs.server.test</artifactId>
diff --git a/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF
index 0545f2d..1596feb 100644
--- a/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF
@@ -3,19 +3,19 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.lfs.server
 Bundle-SymbolicName: org.eclipse.jgit.lfs.server
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
 Bundle-Localization: plugin
 Bundle-Vendor: %Bundle-Vendor
-Export-Package: org.eclipse.jgit.lfs.server;version="5.11.2";
+Export-Package: org.eclipse.jgit.lfs.server;version="5.12.1";
   uses:="javax.servlet.http,
    org.eclipse.jgit.lfs.lib",
- org.eclipse.jgit.lfs.server.fs;version="5.11.2";
+ org.eclipse.jgit.lfs.server.fs;version="5.12.1";
   uses:="javax.servlet,
    javax.servlet.http,
    org.eclipse.jgit.lfs.server,
    org.eclipse.jgit.lfs.lib",
- org.eclipse.jgit.lfs.server.internal;version="5.11.2";x-internal:=true,
- org.eclipse.jgit.lfs.server.s3;version="5.11.2";
+ org.eclipse.jgit.lfs.server.internal;version="5.12.1";x-internal:=true,
+ org.eclipse.jgit.lfs.server.s3;version="5.12.1";
   uses:="org.eclipse.jgit.lfs.server,
    org.eclipse.jgit.lfs.lib"
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
@@ -24,15 +24,15 @@
  javax.servlet.annotation;version="[3.1.0,4.0.0)",
  javax.servlet.http;version="[3.1.0,4.0.0)",
  org.apache.http;version="[4.3.0,5.0.0)",
- org.eclipse.jgit.annotations;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lfs.errors;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lfs.internal;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lfs.lib;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lib;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.nls;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport.http;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport.http.apache;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util;version="[5.11.2,5.12.0)",
+ org.eclipse.jgit.annotations;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lfs.errors;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lfs.internal;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lfs.lib;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lib;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.nls;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport.http;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport.http.apache;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util;version="[5.12.1,5.13.0)",
  org.slf4j;version="[1.7.0,2.0.0)"
diff --git a/org.eclipse.jgit.lfs.server/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.lfs.server/META-INF/SOURCE-MANIFEST.MF
index 7641f4a..5e4ae52 100644
--- a/org.eclipse.jgit.lfs.server/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.lfs.server/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@
 Bundle-Name: org.eclipse.jgit.lfs.server - Sources
 Bundle-SymbolicName: org.eclipse.jgit.lfs.server.source
 Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.11.2.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.lfs.server;version="5.11.2.qualifier";roots="."
+Bundle-Version: 5.12.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.lfs.server;version="5.12.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.lfs.server/pom.xml b/org.eclipse.jgit.lfs.server/pom.xml
index f908bf5..02d70fb 100644
--- a/org.eclipse.jgit.lfs.server/pom.xml
+++ b/org.eclipse.jgit.lfs.server/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.lfs.server</artifactId>
diff --git a/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF
index df90846..7399ba1 100644
--- a/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF
@@ -3,24 +3,24 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.lfs.test
 Bundle-SymbolicName: org.eclipse.jgit.lfs.test
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Import-Package: org.eclipse.jgit.api;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.attributes;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.storage.dfs;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.junit;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lfs;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lfs.errors;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lfs.lib;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lib;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.revwalk;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.treewalk;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.treewalk.filter;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util;version="[5.11.2,5.12.0)",
+Import-Package: org.eclipse.jgit.api;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.attributes;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.storage.dfs;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.junit;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lfs;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lfs.errors;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lfs.lib;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lib;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.revwalk;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.treewalk;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.treewalk.filter;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util;version="[5.12.1,5.13.0)",
  org.hamcrest.core;version="[1.1.0,2.0.0)",
  org.junit;version="[4.13,5.0.0)",
  org.junit.runner;version="[4.13,5.0.0)",
  org.junit.runners;version="[4.13,5.0.0)"
-Export-Package: org.eclipse.jgit.lfs.test;version="5.11.2";x-friends:="org.eclipse.jgit.lfs.server.test"
+Export-Package: org.eclipse.jgit.lfs.test;version="5.12.1";x-friends:="org.eclipse.jgit.lfs.server.test"
diff --git a/org.eclipse.jgit.lfs.test/pom.xml b/org.eclipse.jgit.lfs.test/pom.xml
index eef3ac8..5e58aa5 100644
--- a/org.eclipse.jgit.lfs.test/pom.xml
+++ b/org.eclipse.jgit.lfs.test/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.lfs.test</artifactId>
diff --git a/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF
index 876384f..db8247a 100644
--- a/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF
@@ -3,31 +3,31 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.lfs
 Bundle-SymbolicName: org.eclipse.jgit.lfs
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
 Bundle-Localization: plugin
 Bundle-Vendor: %Bundle-Vendor
-Export-Package: org.eclipse.jgit.lfs;version="5.11.2",
- org.eclipse.jgit.lfs.errors;version="5.11.2",
- org.eclipse.jgit.lfs.internal;version="5.11.2";x-friends:="org.eclipse.jgit.lfs.test,org.eclipse.jgit.lfs.server.fs,org.eclipse.jgit.lfs.server",
- org.eclipse.jgit.lfs.lib;version="5.11.2"
+Export-Package: org.eclipse.jgit.lfs;version="5.12.1",
+ org.eclipse.jgit.lfs.errors;version="5.12.1",
+ org.eclipse.jgit.lfs.internal;version="5.12.1";x-friends:="org.eclipse.jgit.lfs.test,org.eclipse.jgit.lfs.server.fs,org.eclipse.jgit.lfs.server",
+ org.eclipse.jgit.lfs.lib;version="5.12.1"
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Import-Package: com.google.gson;version="[2.8.0,3.0.0)",
  com.google.gson.stream;version="[2.8.0,3.0.0)",
- org.eclipse.jgit.annotations;version="[5.11.2,5.12.0)";resolution:=optional,
- org.eclipse.jgit.api.errors;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.attributes;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.diff;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.errors;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.hooks;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lib;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.nls;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.revwalk;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.storage.file;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.storage.pack;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport.http;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.treewalk;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.treewalk.filter;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util.io;version="[5.11.2,5.12.0)"
+ org.eclipse.jgit.annotations;version="[5.12.1,5.13.0)";resolution:=optional,
+ org.eclipse.jgit.api.errors;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.attributes;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.diff;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.errors;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.hooks;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lib;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.nls;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.revwalk;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.storage.file;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.storage.pack;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport.http;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.treewalk;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.treewalk.filter;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util.io;version="[5.12.1,5.13.0)"
diff --git a/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF
index db9bcc6..9aca20a 100644
--- a/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@
 Bundle-Name: org.eclipse.jgit.lfs - Sources
 Bundle-SymbolicName: org.eclipse.jgit.lfs.source
 Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.11.2.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.lfs;version="5.11.2.qualifier";roots="."
+Bundle-Version: 5.12.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.lfs;version="5.12.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.lfs/pom.xml b/org.eclipse.jgit.lfs/pom.xml
index d1f2ce4..505d0e9 100644
--- a/org.eclipse.jgit.lfs/pom.xml
+++ b/org.eclipse.jgit.lfs/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.lfs</artifactId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml
index cc8756e..ed16046 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.jgit"
       label="%featureName"
-      version="5.11.2.qualifier"
+      version="5.12.1.qualifier"
       provider-name="%providerName">
 
    <description url="http://www.eclipse.org/jgit/">
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml
index ef6a8a6..6e0d1df 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>jgit.tycho.parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <groupId>org.eclipse.jgit.feature</groupId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.xml
index 85dec4c..d148646 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.jgit.gpg.bc"
       label="%featureName"
-      version="5.11.2.qualifier"
+      version="5.12.1.qualifier"
       provider-name="%providerName">
 
    <description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
    </url>
 
    <requires>
-      <import plugin="org.eclipse.jgit" version="5.11.2" match="equivalent"/>
+      <import plugin="org.eclipse.jgit" version="5.12.1" match="equivalent"/>
    </requires>
 
    <plugin
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/pom.xml
index eebe2c4..59863ee 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>jgit.tycho.parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <groupId>org.eclipse.jgit.feature</groupId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml
index beff00e..d392f13 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.jgit.http.apache"
       label="%featureName"
-      version="5.11.2.qualifier"
+      version="5.12.1.qualifier"
       provider-name="%providerName">
 
    <description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
    </url>
 
    <requires>
-      <import plugin="org.eclipse.jgit" version="5.11.2" match="equivalent"/>
+      <import plugin="org.eclipse.jgit" version="5.12.1" match="equivalent"/>
    </requires>
 
    <plugin
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml
index 2584dab..dc4f3ec 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>jgit.tycho.parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <groupId>org.eclipse.jgit.feature</groupId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml
index ce6e241..a3730b7 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.jgit.junit"
       label="%featureName"
-      version="5.11.2.qualifier"
+      version="5.12.1.qualifier"
       provider-name="%providerName">
 
    <description url="http://www.eclipse.org/jgit/">
@@ -24,7 +24,7 @@
 
    <requires>
       <import plugin="com.jcraft.jsch"/>
-      <import plugin="org.eclipse.jgit" version="5.11.2" match="equivalent"/>
+      <import plugin="org.eclipse.jgit" version="5.12.1" match="equivalent"/>
    </requires>
 
    <plugin
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml
index 70ed137..5717376 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>jgit.tycho.parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <groupId>org.eclipse.jgit.feature</groupId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml
index a7f0dd9..bfaa0fa 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.jgit.lfs"
       label="%featureName"
-      version="5.11.2.qualifier"
+      version="5.12.1.qualifier"
       provider-name="%providerName">
 
    <description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
    </url>
 
    <requires>
-      <import feature="org.eclipse.jgit" version="5.11.2" match="equivalent"/>
+      <import feature="org.eclipse.jgit" version="5.12.1" match="equivalent"/>
    </requires>
 
    <plugin
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/pom.xml
index 74d9992..3e34991 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>jgit.tycho.parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <groupId>org.eclipse.jgit.feature</groupId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml
index d009c0a..46556f6 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.jgit.pgm"
       label="%featureName"
-      version="5.11.2.qualifier"
+      version="5.12.1.qualifier"
       provider-name="%providerName">
 
    <description url="http://www.eclipse.org/jgit/">
@@ -35,9 +35,9 @@
          version="0.0.0"/>
 
    <requires>
-      <import feature="org.eclipse.jgit" version="5.11.2" match="equivalent"/>
-      <import feature="org.eclipse.jgit.lfs" version="5.11.2" match="equivalent"/>
-      <import feature="org.eclipse.jgit.ssh.apache" version="5.11.2" match="equivalent"/>
+      <import feature="org.eclipse.jgit" version="5.12.1" match="equivalent"/>
+      <import feature="org.eclipse.jgit.lfs" version="5.12.1" match="equivalent"/>
+      <import feature="org.eclipse.jgit.ssh.apache" version="5.12.1" match="equivalent"/>
    </requires>
 
    <plugin
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml
index 2c1a283..2ba4119 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>jgit.tycho.parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <groupId>org.eclipse.jgit.feature</groupId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml
index 48497e5..68781c1 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>jgit.tycho.parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.repository</artifactId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml
index 4b0ff95..3607076 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.jgit.source"
       label="%featureName"
-      version="5.11.2.qualifier"
+      version="5.12.1.qualifier"
       provider-name="%providerName">
 
    <description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
    </url>
 
    <requires>
-      <import feature="org.eclipse.jgit" version="5.11.2" match="equivalent"/>
+      <import feature="org.eclipse.jgit" version="5.12.1" match="equivalent"/>
    </requires>
 
    <plugin
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml
index 0ca001c..fb3fcad 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>jgit.tycho.parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <groupId>org.eclipse.jgit.feature</groupId>
@@ -30,7 +30,7 @@
     <dependency>
       <groupId>org.eclipse.jgit.feature</groupId>
       <artifactId>org.eclipse.jgit</artifactId>
-      <version>5.11.2-SNAPSHOT</version>
+      <version>5.12.1-SNAPSHOT</version>
     </dependency>
   </dependencies>
 
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml
index 3c9004b..d748508 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.jgit.ssh.apache"
       label="%featureName"
-      version="5.11.2.qualifier"
+      version="5.12.1.qualifier"
       provider-name="%providerName">
 
    <description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
    </url>
 
    <requires>
-      <import feature="org.eclipse.jgit" version="5.11.2" match="equivalent"/>
+      <import feature="org.eclipse.jgit" version="5.12.1" match="equivalent"/>
    </requires>
 
    <plugin
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/pom.xml
index f563cff..a9cd770 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>jgit.tycho.parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <groupId>org.eclipse.jgit.feature</groupId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.xml
index 1bc9234..8147102 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.jgit.ssh.jsch"
       label="%featureName"
-      version="5.11.2.qualifier"
+      version="5.12.1.qualifier"
       provider-name="%providerName">
 
    <description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
    </url>
 
    <requires>
-      <import plugin="org.eclipse.jgit" version="5.11.2" match="equivalent"/>
+      <import plugin="org.eclipse.jgit" version="5.12.1" match="equivalent"/>
    </requires>
 
    <plugin
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/pom.xml
index 526e18c..dcf998f 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>jgit.tycho.parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <groupId>org.eclipse.jgit.feature</groupId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF
index 43c0a83..92d1ade 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/META-INF/MANIFEST.MF
@@ -2,4 +2,4 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: JGit Target Platform Bundle
 Bundle-SymbolicName: org.eclipse.jgit.target
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target
index 715986b..8cc851d 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target
@@ -1,28 +1,28 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.10" sequenceNumber="1615333029">
+<target name="jgit-4.10" sequenceNumber="1623012846">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
-      <unit id="org.eclipse.jetty.client" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.client.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.36.v20210114"/>
-      <repository id="jetty-9.4.36" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.36.v20210114/"/>
+      <unit id="org.eclipse.jetty.client" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.client.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.41.v20210516"/>
+      <repository id="jetty-9.4.40" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.41.v20210516/"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="com.google.gson" version="2.8.6.v20201231-1626"/>
@@ -41,8 +41,8 @@
       <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
       <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/>
       <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
-      <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/>
-      <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/>
+      <unit id="org.apache.ant" version="1.10.10.v20210426-1926"/>
+      <unit id="org.apache.ant.source" version="1.10.10.v20210426-1926"/>
       <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/>
@@ -86,7 +86,7 @@
       <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
       <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
       <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
-      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210223232630/repository"/>
+      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210602031627/repository"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd
index ed443a6..6ba77b9 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd
@@ -1,7 +1,7 @@
 target "jgit-4.10" with source configurePhase
 
 include "projects/jetty-9.4.x.tpd"
-include "orbit/R20210223232630-2021-03.tpd"
+include "orbit/R20210602031627-2021-06.tpd"
 
 location "https://download.eclipse.org/releases/2018-12/" {
 	org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target
index 1926712..164cd82 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target
@@ -1,28 +1,28 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.11" sequenceNumber="1615333055">
+<target name="jgit-4.11" sequenceNumber="1623012873">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
-      <unit id="org.eclipse.jetty.client" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.client.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.36.v20210114"/>
-      <repository id="jetty-9.4.36" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.36.v20210114/"/>
+      <unit id="org.eclipse.jetty.client" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.client.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.41.v20210516"/>
+      <repository id="jetty-9.4.40" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.41.v20210516/"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="com.google.gson" version="2.8.6.v20201231-1626"/>
@@ -41,8 +41,8 @@
       <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
       <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/>
       <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
-      <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/>
-      <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/>
+      <unit id="org.apache.ant" version="1.10.10.v20210426-1926"/>
+      <unit id="org.apache.ant.source" version="1.10.10.v20210426-1926"/>
       <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/>
@@ -86,7 +86,7 @@
       <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
       <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
       <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
-      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210223232630/repository"/>
+      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210602031627/repository"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd
index 013d621..f29a9fe 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd
@@ -1,7 +1,7 @@
 target "jgit-4.11" with source configurePhase
 
 include "projects/jetty-9.4.x.tpd"
-include "orbit/R20210223232630-2021-03.tpd"
+include "orbit/R20210602031627-2021-06.tpd"
 
 location "https://download.eclipse.org/releases/2019-03/" {
 	org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target
index 4449dc3..ed8ad0b 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target
@@ -1,28 +1,28 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.12" sequenceNumber="1615333029">
+<target name="jgit-4.12" sequenceNumber="1623012873">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
-      <unit id="org.eclipse.jetty.client" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.client.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.36.v20210114"/>
-      <repository id="jetty-9.4.36" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.36.v20210114/"/>
+      <unit id="org.eclipse.jetty.client" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.client.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.41.v20210516"/>
+      <repository id="jetty-9.4.40" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.41.v20210516/"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="com.google.gson" version="2.8.6.v20201231-1626"/>
@@ -41,8 +41,8 @@
       <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
       <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/>
       <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
-      <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/>
-      <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/>
+      <unit id="org.apache.ant" version="1.10.10.v20210426-1926"/>
+      <unit id="org.apache.ant.source" version="1.10.10.v20210426-1926"/>
       <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/>
@@ -86,7 +86,7 @@
       <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
       <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
       <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
-      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210223232630/repository"/>
+      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210602031627/repository"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd
index 99008ab..35bf3b0 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd
@@ -1,7 +1,7 @@
 target "jgit-4.12" with source configurePhase
 
 include "projects/jetty-9.4.x.tpd"
-include "orbit/R20210223232630-2021-03.tpd"
+include "orbit/R20210602031627-2021-06.tpd"
 
 location "https://download.eclipse.org/releases/2019-06/" {
 	org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target
index 01a10e7..993e112 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target
@@ -1,28 +1,28 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.13" sequenceNumber="1615333029">
+<target name="jgit-4.13" sequenceNumber="1623012873">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
-      <unit id="org.eclipse.jetty.client" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.client.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.36.v20210114"/>
-      <repository id="jetty-9.4.36" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.36.v20210114/"/>
+      <unit id="org.eclipse.jetty.client" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.client.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.41.v20210516"/>
+      <repository id="jetty-9.4.40" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.41.v20210516/"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="com.google.gson" version="2.8.6.v20201231-1626"/>
@@ -41,8 +41,8 @@
       <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
       <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/>
       <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
-      <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/>
-      <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/>
+      <unit id="org.apache.ant" version="1.10.10.v20210426-1926"/>
+      <unit id="org.apache.ant.source" version="1.10.10.v20210426-1926"/>
       <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/>
@@ -86,7 +86,7 @@
       <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
       <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
       <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
-      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210223232630/repository"/>
+      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210602031627/repository"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd
index d0db92c..6da9b00 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd
@@ -1,7 +1,7 @@
 target "jgit-4.13" with source configurePhase
 
 include "projects/jetty-9.4.x.tpd"
-include "orbit/R20210223232630-2021-03.tpd"
+include "orbit/R20210602031627-2021-06.tpd"
 
 location "https://download.eclipse.org/releases/2019-09/" {
 	org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target
index b56f9a1..e8cfa60 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target
@@ -1,28 +1,28 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.14" sequenceNumber="1615333029">
+<target name="jgit-4.14" sequenceNumber="1623012870">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
-      <unit id="org.eclipse.jetty.client" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.client.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.36.v20210114"/>
-      <repository id="jetty-9.4.36" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.36.v20210114/"/>
+      <unit id="org.eclipse.jetty.client" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.client.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.41.v20210516"/>
+      <repository id="jetty-9.4.40" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.41.v20210516/"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="com.google.gson" version="2.8.6.v20201231-1626"/>
@@ -41,8 +41,8 @@
       <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
       <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/>
       <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
-      <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/>
-      <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/>
+      <unit id="org.apache.ant" version="1.10.10.v20210426-1926"/>
+      <unit id="org.apache.ant.source" version="1.10.10.v20210426-1926"/>
       <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/>
@@ -86,7 +86,7 @@
       <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
       <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
       <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
-      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210223232630/repository"/>
+      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210602031627/repository"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd
index e0a730e..70dce0c 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd
@@ -1,7 +1,7 @@
 target "jgit-4.14" with source configurePhase
 
 include "projects/jetty-9.4.x.tpd"
-include "orbit/R20210223232630-2021-03.tpd"
+include "orbit/R20210602031627-2021-06.tpd"
 
 location "https://download.eclipse.org/releases/2019-12/201912181000/" {
 	org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target
index f3820a7..81c6450 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target
@@ -1,28 +1,28 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.15" sequenceNumber="1615333029">
+<target name="jgit-4.15" sequenceNumber="1623012870">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
-      <unit id="org.eclipse.jetty.client" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.client.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.36.v20210114"/>
-      <repository id="jetty-9.4.36" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.36.v20210114/"/>
+      <unit id="org.eclipse.jetty.client" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.client.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.41.v20210516"/>
+      <repository id="jetty-9.4.40" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.41.v20210516/"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="com.google.gson" version="2.8.6.v20201231-1626"/>
@@ -41,8 +41,8 @@
       <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
       <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/>
       <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
-      <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/>
-      <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/>
+      <unit id="org.apache.ant" version="1.10.10.v20210426-1926"/>
+      <unit id="org.apache.ant.source" version="1.10.10.v20210426-1926"/>
       <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/>
@@ -86,7 +86,7 @@
       <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
       <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
       <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
-      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210223232630/repository"/>
+      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210602031627/repository"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd
index 773a9a9..edf5cec 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd
@@ -1,7 +1,7 @@
 target "jgit-4.15" with source configurePhase
 
 include "projects/jetty-9.4.x.tpd"
-include "orbit/R20210223232630-2021-03.tpd"
+include "orbit/R20210602031627-2021-06.tpd"
 
 location "https://download.eclipse.org/releases/2020-03/202003181000/" {
 	org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target
index 6a9f582..3afc3b8 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target
@@ -1,28 +1,28 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.16" sequenceNumber="1615333030">
+<target name="jgit-4.16" sequenceNumber="1623012874">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
-      <unit id="org.eclipse.jetty.client" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.client.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.36.v20210114"/>
-      <repository id="jetty-9.4.36" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.36.v20210114/"/>
+      <unit id="org.eclipse.jetty.client" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.client.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.41.v20210516"/>
+      <repository id="jetty-9.4.40" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.41.v20210516/"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="com.google.gson" version="2.8.6.v20201231-1626"/>
@@ -41,8 +41,8 @@
       <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
       <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/>
       <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
-      <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/>
-      <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/>
+      <unit id="org.apache.ant" version="1.10.10.v20210426-1926"/>
+      <unit id="org.apache.ant.source" version="1.10.10.v20210426-1926"/>
       <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/>
@@ -86,7 +86,7 @@
       <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
       <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
       <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
-      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210223232630/repository"/>
+      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210602031627/repository"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd
index 8b4de8b..54e8a96 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd
@@ -1,7 +1,7 @@
 target "jgit-4.16" with source configurePhase
 
 include "projects/jetty-9.4.x.tpd"
-include "orbit/R20210223232630-2021-03.tpd"
+include "orbit/R20210602031627-2021-06.tpd"
 
 location "https://download.eclipse.org/releases/2020-06/" {
 	org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target
index b7481e0..f61261f 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target
@@ -1,28 +1,28 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.17" sequenceNumber="1615333030">
+<target name="jgit-4.17" sequenceNumber="1623012875">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
-      <unit id="org.eclipse.jetty.client" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.client.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.36.v20210114"/>
-      <repository id="jetty-9.4.36" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.36.v20210114/"/>
+      <unit id="org.eclipse.jetty.client" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.client.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.41.v20210516"/>
+      <repository id="jetty-9.4.40" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.41.v20210516/"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="com.google.gson" version="2.8.6.v20201231-1626"/>
@@ -41,8 +41,8 @@
       <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
       <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/>
       <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
-      <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/>
-      <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/>
+      <unit id="org.apache.ant" version="1.10.10.v20210426-1926"/>
+      <unit id="org.apache.ant.source" version="1.10.10.v20210426-1926"/>
       <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/>
@@ -86,7 +86,7 @@
       <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
       <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
       <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
-      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210223232630/repository"/>
+      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210602031627/repository"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd
index b2585be..2b2af1a 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd
@@ -1,7 +1,7 @@
 target "jgit-4.17" with source configurePhase
 
 include "projects/jetty-9.4.x.tpd"
-include "orbit/R20210223232630-2021-03.tpd"
+include "orbit/R20210602031627-2021-06.tpd"
 
 location "https://download.eclipse.org/releases/2020-09/" {
 	org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target
index 6d851a2..c17c1c8 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target
@@ -1,28 +1,28 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.18" sequenceNumber="1615333029">
+<target name="jgit-4.18" sequenceNumber="1623012874">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
-      <unit id="org.eclipse.jetty.client" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.client.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.36.v20210114"/>
-      <repository id="jetty-9.4.36" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.36.v20210114/"/>
+      <unit id="org.eclipse.jetty.client" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.client.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.41.v20210516"/>
+      <repository id="jetty-9.4.40" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.41.v20210516/"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="com.google.gson" version="2.8.6.v20201231-1626"/>
@@ -41,8 +41,8 @@
       <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
       <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/>
       <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
-      <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/>
-      <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/>
+      <unit id="org.apache.ant" version="1.10.10.v20210426-1926"/>
+      <unit id="org.apache.ant.source" version="1.10.10.v20210426-1926"/>
       <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/>
@@ -86,7 +86,7 @@
       <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
       <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
       <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
-      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210223232630/repository"/>
+      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210602031627/repository"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd
index 6d16256..0f42bb6 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd
@@ -1,7 +1,7 @@
 target "jgit-4.18" with source configurePhase
 
 include "projects/jetty-9.4.x.tpd"
-include "orbit/R20210223232630-2021-03.tpd"
+include "orbit/R20210602031627-2021-06.tpd"
 
 location "https://download.eclipse.org/releases/2020-12/" {
 	org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19-staging.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target
similarity index 77%
rename from org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19-staging.target
rename to org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target
index 1a0505d..6db7fe1 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19-staging.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target
@@ -1,28 +1,28 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.19-staging" sequenceNumber="1615333029">
+<target name="jgit-4.19-staging" sequenceNumber="1623012870">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
-      <unit id="org.eclipse.jetty.client" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.client.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.36.v20210114"/>
-      <repository id="jetty-9.4.36" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.36.v20210114/"/>
+      <unit id="org.eclipse.jetty.client" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.client.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.41.v20210516"/>
+      <repository id="jetty-9.4.40" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.41.v20210516/"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="com.google.gson" version="2.8.6.v20201231-1626"/>
@@ -41,8 +41,8 @@
       <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
       <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/>
       <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
-      <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/>
-      <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/>
+      <unit id="org.apache.ant" version="1.10.10.v20210426-1926"/>
+      <unit id="org.apache.ant.source" version="1.10.10.v20210426-1926"/>
       <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/>
@@ -86,7 +86,7 @@
       <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
       <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
       <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
-      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210223232630/repository"/>
+      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210602031627/repository"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19-staging.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd
similarity index 79%
rename from org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19-staging.tpd
rename to org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd
index 7ed5377..5e4305c 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19-staging.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd
@@ -1,7 +1,7 @@
 target "jgit-4.19-staging" with source configurePhase
 
 include "projects/jetty-9.4.x.tpd"
-include "orbit/R20210223232630-2021-03.tpd"
+include "orbit/R20210602031627-2021-06.tpd"
 
 location "https://download.eclipse.org/staging/2021-03/" {
 	org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19-staging.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20-staging.target
similarity index 77%
copy from org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19-staging.target
copy to org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20-staging.target
index 1a0505d..f256622 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19-staging.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20-staging.target
@@ -1,28 +1,28 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.19-staging" sequenceNumber="1615333029">
+<target name="jgit-4.20-staging" sequenceNumber="1623012876">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
-      <unit id="org.eclipse.jetty.client" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.client.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.36.v20210114"/>
-      <repository id="jetty-9.4.36" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.36.v20210114/"/>
+      <unit id="org.eclipse.jetty.client" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.client.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.41.v20210516"/>
+      <repository id="jetty-9.4.40" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.41.v20210516/"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="com.google.gson" version="2.8.6.v20201231-1626"/>
@@ -41,8 +41,8 @@
       <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
       <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/>
       <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
-      <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/>
-      <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/>
+      <unit id="org.apache.ant" version="1.10.10.v20210426-1926"/>
+      <unit id="org.apache.ant.source" version="1.10.10.v20210426-1926"/>
       <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/>
@@ -86,11 +86,11 @@
       <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
       <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
       <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
-      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210223232630/repository"/>
+      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210602031627/repository"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.osgi" version="0.0.0"/>
-      <repository location="https://download.eclipse.org/staging/2021-03/"/>
+      <repository location="https://download.eclipse.org/staging/2021-06/"/>
     </location>
   </locations>
 </target>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20-staging.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20-staging.tpd
new file mode 100644
index 0000000..de929b5
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20-staging.tpd
@@ -0,0 +1,8 @@
+target "jgit-4.20-staging" with source configurePhase
+
+include "projects/jetty-9.4.x.tpd"
+include "orbit/R20210602031627-2021-06.tpd"
+
+location "https://download.eclipse.org/staging/2021-06/" {
+	org.eclipse.osgi lazy
+}
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target
index 249be4c..ca1696b 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target
@@ -1,28 +1,28 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.6" sequenceNumber="1615333044">
+<target name="jgit-4.6" sequenceNumber="1623012886">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
-      <unit id="org.eclipse.jetty.client" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.client.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.36.v20210114"/>
-      <repository id="jetty-9.4.36" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.36.v20210114/"/>
+      <unit id="org.eclipse.jetty.client" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.client.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.41.v20210516"/>
+      <repository id="jetty-9.4.40" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.41.v20210516/"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="com.google.gson" version="2.8.6.v20201231-1626"/>
@@ -41,8 +41,8 @@
       <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
       <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/>
       <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
-      <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/>
-      <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/>
+      <unit id="org.apache.ant" version="1.10.10.v20210426-1926"/>
+      <unit id="org.apache.ant.source" version="1.10.10.v20210426-1926"/>
       <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/>
@@ -86,7 +86,7 @@
       <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
       <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
       <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
-      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210223232630/repository"/>
+      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210602031627/repository"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd
index 6e7cd8b..96a6073 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd
@@ -1,7 +1,7 @@
 target "jgit-4.6" with source configurePhase
 
 include "projects/jetty-9.4.x.tpd"
-include "orbit/R20210223232630-2021-03.tpd"
+include "orbit/R20210602031627-2021-06.tpd"
 
 location "https://download.eclipse.org/releases/neon/" {
 	org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target
index 72c44d7..6098388 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target
@@ -1,28 +1,28 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.7" sequenceNumber="1615333034">
+<target name="jgit-4.7" sequenceNumber="1623012878">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
-      <unit id="org.eclipse.jetty.client" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.client.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.36.v20210114"/>
-      <repository id="jetty-9.4.36" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.36.v20210114/"/>
+      <unit id="org.eclipse.jetty.client" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.client.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.41.v20210516"/>
+      <repository id="jetty-9.4.40" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.41.v20210516/"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="com.google.gson" version="2.8.6.v20201231-1626"/>
@@ -41,8 +41,8 @@
       <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
       <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/>
       <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
-      <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/>
-      <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/>
+      <unit id="org.apache.ant" version="1.10.10.v20210426-1926"/>
+      <unit id="org.apache.ant.source" version="1.10.10.v20210426-1926"/>
       <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/>
@@ -86,7 +86,7 @@
       <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
       <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
       <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
-      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210223232630/repository"/>
+      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210602031627/repository"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd
index 5a58b00..bfb68b2 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd
@@ -1,7 +1,7 @@
 target "jgit-4.7" with source configurePhase
 
 include "projects/jetty-9.4.x.tpd"
-include "orbit/R20210223232630-2021-03.tpd"
+include "orbit/R20210602031627-2021-06.tpd"
 
 location "https://download.eclipse.org/releases/oxygen/" {
 	org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target
index 10e3dea..180b814 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target
@@ -1,28 +1,28 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.8" sequenceNumber="1615333030">
+<target name="jgit-4.8" sequenceNumber="1623012874">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
-      <unit id="org.eclipse.jetty.client" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.client.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.36.v20210114"/>
-      <repository id="jetty-9.4.36" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.36.v20210114/"/>
+      <unit id="org.eclipse.jetty.client" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.client.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.41.v20210516"/>
+      <repository id="jetty-9.4.40" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.41.v20210516/"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="com.google.gson" version="2.8.6.v20201231-1626"/>
@@ -41,8 +41,8 @@
       <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
       <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/>
       <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
-      <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/>
-      <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/>
+      <unit id="org.apache.ant" version="1.10.10.v20210426-1926"/>
+      <unit id="org.apache.ant.source" version="1.10.10.v20210426-1926"/>
       <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/>
@@ -86,7 +86,7 @@
       <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
       <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
       <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
-      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210223232630/repository"/>
+      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210602031627/repository"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd
index 3114877..e3e6b21 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd
@@ -1,7 +1,7 @@
 target "jgit-4.8" with source configurePhase
 
 include "projects/jetty-9.4.x.tpd"
-include "orbit/R20210223232630-2021-03.tpd"
+include "orbit/R20210602031627-2021-06.tpd"
 
 location "https://download.eclipse.org/releases/photon/" {
 	org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target
index 55b3c60..27b3096 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target
@@ -1,28 +1,28 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.9" sequenceNumber="1615333029">
+<target name="jgit-4.9" sequenceNumber="1623012874">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
-      <unit id="org.eclipse.jetty.client" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.client.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.continuation.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.http.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.io.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.security.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.server.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.servlet.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.source" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax" version="9.4.36.v20210114"/>
-      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.36.v20210114"/>
-      <repository id="jetty-9.4.36" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.36.v20210114/"/>
+      <unit id="org.eclipse.jetty.client" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.client.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.continuation.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.http.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.io.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.security.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.server.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.servlet.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.source" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax" version="9.4.41.v20210516"/>
+      <unit id="org.eclipse.jetty.util.ajax.source" version="9.4.41.v20210516"/>
+      <repository id="jetty-9.4.40" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.41.v20210516/"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="com.google.gson" version="2.8.6.v20201231-1626"/>
@@ -41,8 +41,8 @@
       <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/>
       <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/>
       <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
-      <unit id="org.apache.ant" version="1.10.9.v20201106-1946"/>
-      <unit id="org.apache.ant.source" version="1.10.9.v20201106-1946"/>
+      <unit id="org.apache.ant" version="1.10.10.v20210426-1926"/>
+      <unit id="org.apache.ant.source" version="1.10.10.v20210426-1926"/>
       <unit id="org.apache.commons.codec" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.codec.source" version="1.14.0.v20200818-1422"/>
       <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/>
@@ -86,7 +86,7 @@
       <unit id="org.slf4j.binding.log4j12.source" version="1.7.30.v20201108-2042"/>
       <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
       <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
-      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210223232630/repository"/>
+      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210602031627/repository"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd
index 132a0b0..938d80b 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd
@@ -1,7 +1,7 @@
 target "jgit-4.9" with source configurePhase
 
 include "projects/jetty-9.4.x.tpd"
-include "orbit/R20210223232630-2021-03.tpd"
+include "orbit/R20210602031627-2021-06.tpd"
 
 location "https://download.eclipse.org/releases/2018-09/" {
 	org.eclipse.osgi lazy
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20210602031627-2021-06.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20210602031627-2021-06.tpd
new file mode 100644
index 0000000..83b5bb3
--- /dev/null
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20210602031627-2021-06.tpd
@@ -0,0 +1,66 @@
+target "R20210602031627-2021-06" with source configurePhase
+// see https://download.eclipse.org/tools/orbit/downloads/
+
+location "https://download.eclipse.org/tools/orbit/downloads/drops/R20210602031627/repository" {
+	com.google.gson [2.8.6.v20201231-1626,2.8.6.v20201231-1626]
+	com.google.gson.source [2.8.6.v20201231-1626,2.8.6.v20201231-1626]
+	com.jcraft.jsch [0.1.55.v20190404-1902,0.1.55.v20190404-1902]
+	com.jcraft.jsch.source [0.1.55.v20190404-1902,0.1.55.v20190404-1902]
+	com.jcraft.jzlib [1.1.1.v201205102305,1.1.1.v201205102305]
+	com.jcraft.jzlib.source [1.1.1.v201205102305,1.1.1.v201205102305]
+	javaewah [1.1.7.v20200107-0831,1.1.7.v20200107-0831]
+	javaewah.source [1.1.7.v20200107-0831,1.1.7.v20200107-0831]
+	javax.servlet [3.1.0.v201410161800,3.1.0.v201410161800]
+	javax.servlet.source [3.1.0.v201410161800,3.1.0.v201410161800]
+	net.bytebuddy.byte-buddy [1.9.0.v20181107-1410,1.9.0.v20181107-1410]
+	net.bytebuddy.byte-buddy-agent [1.9.0.v20181106-1534,1.9.0.v20181106-1534]
+	net.bytebuddy.byte-buddy-agent.source [1.9.0.v20181106-1534,1.9.0.v20181106-1534]
+	net.bytebuddy.byte-buddy.source [1.9.0.v20181107-1410,1.9.0.v20181107-1410]
+	net.i2p.crypto.eddsa [0.3.0.v20181102-1323,0.3.0.v20181102-1323]
+	net.i2p.crypto.eddsa.source [0.3.0.v20181102-1323,0.3.0.v20181102-1323]
+	org.apache.ant [1.10.10.v20210426-1926,1.10.10.v20210426-1926]
+	org.apache.ant.source [1.10.10.v20210426-1926,1.10.10.v20210426-1926]
+	org.apache.commons.codec [1.14.0.v20200818-1422,1.14.0.v20200818-1422]
+	org.apache.commons.codec.source [1.14.0.v20200818-1422,1.14.0.v20200818-1422]
+	org.apache.commons.compress [1.19.0.v20200106-2343,1.19.0.v20200106-2343]
+	org.apache.commons.compress.source [1.19.0.v20200106-2343,1.19.0.v20200106-2343]
+	org.apache.commons.logging [1.2.0.v20180409-1502,1.2.0.v20180409-1502]
+	org.apache.commons.logging.source [1.2.0.v20180409-1502,1.2.0.v20180409-1502]
+	org.apache.httpcomponents.httpclient [4.5.13.v20210128-2225,4.5.13.v20210128-2225]
+	org.apache.httpcomponents.httpclient.source [4.5.13.v20210128-2225,4.5.13.v20210128-2225]
+	org.apache.httpcomponents.httpcore [4.4.14.v20210128-2225,4.4.14.v20210128-2225]
+	org.apache.httpcomponents.httpcore.source [4.4.14.v20210128-2225,4.4.14.v20210128-2225]
+	org.apache.log4j [1.2.15.v201012070815,1.2.15.v201012070815]
+	org.apache.log4j.source [1.2.15.v201012070815,1.2.15.v201012070815]
+	org.apache.sshd.osgi [2.6.0.v20210201-2003,2.6.0.v20210201-2003]
+	org.apache.sshd.osgi.source [2.6.0.v20210201-2003,2.6.0.v20210201-2003]
+	org.apache.sshd.sftp [2.6.0.v20210201-2003,2.6.0.v20210201-2003]
+	org.apache.sshd.sftp.source [2.6.0.v20210201-2003,2.6.0.v20210201-2003]
+	org.assertj [3.14.0.v20200120-1926,3.14.0.v20200120-1926]
+	org.assertj.source [3.14.0.v20200120-1926,3.14.0.v20200120-1926]
+	org.bouncycastle.bcpg [1.65.0.v20200527-1955,1.65.0.v20200527-1955]
+	org.bouncycastle.bcpg.source [1.65.0.v20200527-1955,1.65.0.v20200527-1955]
+	org.bouncycastle.bcpkix [1.65.0.v20200527-1955,1.65.0.v20200527-1955]
+	org.bouncycastle.bcpkix.source [1.65.0.v20200527-1955,1.65.0.v20200527-1955]
+	org.bouncycastle.bcprov [1.65.1.v20200529-1514,1.65.1.v20200529-1514]
+	org.bouncycastle.bcprov.source [1.65.1.v20200529-1514,1.65.1.v20200529-1514]
+	org.hamcrest [1.1.0.v20090501071000,1.1.0.v20090501071000]
+	org.hamcrest.core [1.3.0.v20180420-1519,1.3.0.v20180420-1519]
+	org.hamcrest.core.source [1.3.0.v20180420-1519,1.3.0.v20180420-1519]
+	org.hamcrest.library [1.3.0.v20180524-2246,1.3.0.v20180524-2246]
+	org.hamcrest.library.source [1.3.0.v20180524-2246,1.3.0.v20180524-2246]
+	org.junit [4.13.0.v20200204-1500,4.13.0.v20200204-1500]
+	org.junit.source [4.13.0.v20200204-1500,4.13.0.v20200204-1500]
+	org.kohsuke.args4j [2.33.0.v20160323-2218,2.33.0.v20160323-2218]
+	org.kohsuke.args4j.source [2.33.0.v20160323-2218,2.33.0.v20160323-2218]
+	org.mockito [2.23.0.v20200310-1642,2.23.0.v20200310-1642]
+	org.mockito.source [2.23.0.v20200310-1642,2.23.0.v20200310-1642]
+	org.objenesis [2.6.0.v20180420-1519,2.6.0.v20180420-1519]
+	org.objenesis.source [2.6.0.v20180420-1519,2.6.0.v20180420-1519]
+	org.slf4j.api [1.7.30.v20200204-2150,1.7.30.v20200204-2150]
+	org.slf4j.api.source [1.7.30.v20200204-2150,1.7.30.v20200204-2150]
+	org.slf4j.binding.log4j12 [1.7.30.v20201108-2042,1.7.30.v20201108-2042]
+	org.slf4j.binding.log4j12.source [1.7.30.v20201108-2042,1.7.30.v20201108-2042]
+	org.tukaani.xz [1.8.0.v20180207-1613,1.8.0.v20180207-1613]
+	org.tukaani.xz.source [1.8.0.v20180207-1613,1.8.0.v20180207-1613]
+}
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml
index 70f7cea..5847b79 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/pom.xml
@@ -16,7 +16,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>jgit.tycho.parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.target</artifactId>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.4.x.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.4.x.tpd
index 4eec8aa..fb0df1e 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.4.x.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.4.x.tpd
@@ -1,22 +1,22 @@
 target "jetty-9.4.x" with source configurePhase
 
-location jetty-9.4.36 "https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.36.v20210114/" {
-	org.eclipse.jetty.client [9.4.36.v20210114,9.4.36.v20210114]
-	org.eclipse.jetty.client.source [9.4.36.v20210114,9.4.36.v20210114]
-	org.eclipse.jetty.continuation [9.4.36.v20210114,9.4.36.v20210114]
-	org.eclipse.jetty.continuation.source [9.4.36.v20210114,9.4.36.v20210114]
-	org.eclipse.jetty.http [9.4.36.v20210114,9.4.36.v20210114]
-	org.eclipse.jetty.http.source [9.4.36.v20210114,9.4.36.v20210114]
-	org.eclipse.jetty.io [9.4.36.v20210114,9.4.36.v20210114]
-	org.eclipse.jetty.io.source [9.4.36.v20210114,9.4.36.v20210114]
-	org.eclipse.jetty.security [9.4.36.v20210114,9.4.36.v20210114]
-	org.eclipse.jetty.security.source [9.4.36.v20210114,9.4.36.v20210114]
-	org.eclipse.jetty.server [9.4.36.v20210114,9.4.36.v20210114]
-	org.eclipse.jetty.server.source [9.4.36.v20210114,9.4.36.v20210114]
-	org.eclipse.jetty.servlet [9.4.36.v20210114,9.4.36.v20210114]
-	org.eclipse.jetty.servlet.source [9.4.36.v20210114,9.4.36.v20210114]
-	org.eclipse.jetty.util [9.4.36.v20210114,9.4.36.v20210114]
-	org.eclipse.jetty.util.source [9.4.36.v20210114,9.4.36.v20210114]
-	org.eclipse.jetty.util.ajax [9.4.36.v20210114,9.4.36.v20210114]
-	org.eclipse.jetty.util.ajax.source [9.4.36.v20210114,9.4.36.v20210114]
+location jetty-9.4.40 "https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.41.v20210516/" {
+	org.eclipse.jetty.client [9.4.41.v20210516,9.4.41.v20210516]
+	org.eclipse.jetty.client.source [9.4.41.v20210516,9.4.41.v20210516]
+	org.eclipse.jetty.continuation [9.4.41.v20210516,9.4.41.v20210516]
+	org.eclipse.jetty.continuation.source [9.4.41.v20210516,9.4.41.v20210516]
+	org.eclipse.jetty.http [9.4.41.v20210516,9.4.41.v20210516]
+	org.eclipse.jetty.http.source [9.4.41.v20210516,9.4.41.v20210516]
+	org.eclipse.jetty.io [9.4.41.v20210516,9.4.41.v20210516]
+	org.eclipse.jetty.io.source [9.4.41.v20210516,9.4.41.v20210516]
+	org.eclipse.jetty.security [9.4.41.v20210516,9.4.41.v20210516]
+	org.eclipse.jetty.security.source [9.4.41.v20210516,9.4.41.v20210516]
+	org.eclipse.jetty.server [9.4.41.v20210516,9.4.41.v20210516]
+	org.eclipse.jetty.server.source [9.4.41.v20210516,9.4.41.v20210516]
+	org.eclipse.jetty.servlet [9.4.41.v20210516,9.4.41.v20210516]
+	org.eclipse.jetty.servlet.source [9.4.41.v20210516,9.4.41.v20210516]
+	org.eclipse.jetty.util [9.4.41.v20210516,9.4.41.v20210516]
+	org.eclipse.jetty.util.source [9.4.41.v20210516,9.4.41.v20210516]
+	org.eclipse.jetty.util.ajax [9.4.41.v20210516,9.4.41.v20210516]
+	org.eclipse.jetty.util.ajax.source [9.4.41.v20210516,9.4.41.v20210516]
 }
diff --git a/org.eclipse.jgit.packaging/pom.xml b/org.eclipse.jgit.packaging/pom.xml
index 6ab3254..7ff001e 100644
--- a/org.eclipse.jgit.packaging/pom.xml
+++ b/org.eclipse.jgit.packaging/pom.xml
@@ -16,7 +16,7 @@
 
   <groupId>org.eclipse.jgit</groupId>
   <artifactId>jgit.tycho.parent</artifactId>
-  <version>5.11.2-SNAPSHOT</version>
+  <version>5.12.1-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <name>JGit Tycho Parent</name>
@@ -294,7 +294,7 @@
         <plugin>
           <groupId>org.eclipse.cbi.maven.plugins</groupId>
           <artifactId>eclipse-jarsigner-plugin</artifactId>
-          <version>1.1.7</version>
+          <version>1.3.1</version>
         </plugin>
         <plugin>
           <groupId>org.codehaus.mojo</groupId>
diff --git a/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF
index ae67125..704ad7c 100644
--- a/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF
@@ -3,28 +3,28 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.pgm.test
 Bundle-SymbolicName: org.eclipse.jgit.pgm.test
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Import-Package: org.eclipse.jgit.api;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.api.errors;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.diff;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.dircache;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.storage.file;version="5.11.2",
- org.eclipse.jgit.junit;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lib;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.merge;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.pgm;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.pgm.internal;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.pgm.opt;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.revwalk;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.storage.file;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.treewalk;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util.io;version="[5.11.2,5.12.0)",
+Import-Package: org.eclipse.jgit.api;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.api.errors;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.diff;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.dircache;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.storage.file;version="5.12.1",
+ org.eclipse.jgit.junit;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lib;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.merge;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.pgm;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.pgm.internal;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.pgm.opt;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.revwalk;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.storage.file;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.treewalk;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util.io;version="[5.12.1,5.13.0)",
  org.hamcrest.core;bundle-version="[1.1.0,2.0.0)",
  org.junit;version="[4.13,5.0.0)",
  org.junit.rules;version="[4.13,5.0.0)",
diff --git a/org.eclipse.jgit.pgm.test/pom.xml b/org.eclipse.jgit.pgm.test/pom.xml
index ca908a4..77dd85f 100644
--- a/org.eclipse.jgit.pgm.test/pom.xml
+++ b/org.eclipse.jgit.pgm.test/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.pgm.test</artifactId>
diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/RevListTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/RevListTest.java
new file mode 100644
index 0000000..06fddc2
--- /dev/null
+++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/RevListTest.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2021, kylezhao <kylezhao@tencent.com> and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package org.eclipse.jgit.pgm;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jgit.api.Git;
+import org.eclipse.jgit.lib.CLIRepositoryTestCase;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.junit.Before;
+import org.junit.Test;
+
+public class RevListTest extends CLIRepositoryTestCase {
+
+	private Git git;
+
+	@Override
+	@Before
+	public void setUp() throws Exception {
+		super.setUp();
+		git = new Git(db);
+	}
+
+	@Test
+	public void testWithParentsFlag() throws Exception {
+		List<RevCommit> commits = createCommitsForParentsFlag(git);
+		String result = toString(
+				execute("git rev-list HEAD --parents -- Test.txt"));
+
+		String expect = toString(
+				commits.get(3).name() + ' ' + commits.get(1).name(),
+				commits.get(1).name());
+
+		assertEquals(expect, result);
+	}
+
+	@Test
+	public void testWithoutParentsFlag() throws Exception {
+		List<RevCommit> commits = createCommitsForParentsFlag(git);
+		String result = toString(execute("git rev-list HEAD -- Test.txt"));
+
+		String expect = toString(commits.get(3).name(), commits.get(1).name());
+
+		assertEquals(expect, result);
+	}
+
+	private List<RevCommit> createCommitsForParentsFlag(Git git)
+			throws Exception {
+		List<RevCommit> commits = new ArrayList<>();
+		writeTrashFile("Test1.txt", "Hello world");
+		git.add().addFilepattern("Test1.txt").call();
+		commits.add(git.commit().setMessage("commit#0").call());
+		writeTrashFile("Test.txt", "Hello world!");
+		git.add().addFilepattern("Test.txt").call();
+		commits.add(git.commit().setMessage("commit#1").call());
+		writeTrashFile("Test1.txt", "Hello world!!");
+		git.add().addFilepattern("Test1.txt").call();
+		commits.add(git.commit().setMessage("commit#2").call());
+		writeTrashFile("Test.txt", "Hello world!!!");
+		git.add().addFilepattern("Test.txt").call();
+		commits.add(git.commit().setMessage("commit#3").call());
+		return commits;
+	}
+}
diff --git a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF
index 9200d3b..b4a1858 100644
--- a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.pgm
 Bundle-SymbolicName: org.eclipse.jgit.pgm
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
@@ -14,46 +14,46 @@
  org.eclipse.jetty.servlet;version="[9.4.5,10.0.0)",
  org.eclipse.jetty.util;version="[9.4.5,10.0.0)",
  org.eclipse.jetty.util.component;version="[9.4.5,10.0.0)",
- org.eclipse.jgit.api;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.api.errors;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.archive;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.awtui;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.blame;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.diff;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.dircache;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.errors;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.gitrepo;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.storage.io;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.storage.pack;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.storage.reftable;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lfs;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lfs.server;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lfs.server.fs;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lfs.server.s3;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lib;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.merge;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.nls;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.notes;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.revplot;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.revwalk;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.revwalk.filter;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.storage.file;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.storage.pack;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport.http.apache;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport.resolver;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport.sshd;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.treewalk;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.treewalk.filter;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util.io;version="[5.11.2,5.12.0)",
+ org.eclipse.jgit.api;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.api.errors;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.archive;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.awtui;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.blame;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.diff;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.dircache;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.errors;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.gitrepo;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.storage.io;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.storage.pack;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.storage.reftable;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lfs;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lfs.server;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lfs.server.fs;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lfs.server.s3;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lib;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.merge;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.nls;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.notes;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.revplot;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.revwalk;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.revwalk.filter;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.storage.file;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.storage.pack;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport.http.apache;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport.resolver;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport.sshd;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.treewalk;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.treewalk.filter;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util.io;version="[5.12.1,5.13.0)",
  org.kohsuke.args4j;version="[2.33.0,3.0.0)",
  org.kohsuke.args4j.spi;version="[2.33.0,3.0.0)"
-Export-Package: org.eclipse.jgit.console;version="5.11.2";
+Export-Package: org.eclipse.jgit.console;version="5.12.1";
  uses:="org.eclipse.jgit.transport,
   org.eclipse.jgit.util",
- org.eclipse.jgit.pgm;version="5.11.2";
+ org.eclipse.jgit.pgm;version="5.12.1";
   uses:="org.eclipse.jgit.transport,
    org.eclipse.jgit.util.io,
    org.eclipse.jgit.awtui,
@@ -65,14 +65,14 @@
    org.eclipse.jgit.treewalk,
    org.eclipse.jgit.api,
    javax.swing",
- org.eclipse.jgit.pgm.debug;version="5.11.2";
+ org.eclipse.jgit.pgm.debug;version="5.12.1";
   uses:="org.eclipse.jgit.util.io,
    org.eclipse.jgit.pgm,
    org.eclipse.jetty.servlet",
- org.eclipse.jgit.pgm.internal;version="5.11.2";
+ org.eclipse.jgit.pgm.internal;version="5.12.1";
   x-friends:="org.eclipse.jgit.pgm.test,
    org.eclipse.jgit.test",
- org.eclipse.jgit.pgm.opt;version="5.11.2";
+ org.eclipse.jgit.pgm.opt;version="5.12.1";
   uses:="org.kohsuke.args4j,
    org.eclipse.jgit.lib,
    org.eclipse.jgit.revwalk,
diff --git a/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF
index df01339..8f433d5 100644
--- a/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.pgm/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@
 Bundle-Name: org.eclipse.jgit.pgm - Sources
 Bundle-SymbolicName: org.eclipse.jgit.pgm.source
 Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.11.2.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="5.11.2.qualifier";roots="."
+Bundle-Version: 5.12.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="5.12.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.pgm/pom.xml b/org.eclipse.jgit.pgm/pom.xml
index c07e146..36da4aa 100644
--- a/org.eclipse.jgit.pgm/pom.xml
+++ b/org.eclipse.jgit.pgm/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.pgm</artifactId>
diff --git a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties
index 83846ee..38deab9 100644
--- a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties
+++ b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties
@@ -115,6 +115,7 @@
 metaVar_connProp=conn.prop
 metaVar_diffAlg=ALGORITHM
 metaVar_directory=DIRECTORY
+metaVar_extraArgument=ours|theirs
 metaVar_file=FILE
 metaVar_filepattern=filepattern
 metaVar_gitDir=GIT_DIR
@@ -217,6 +218,7 @@
 treeIsRequired=argument tree is required
 tooManyRefsGiven=Too many refs given
 unknownIoErrorStdout=An unknown I/O error occurred on standard output
+unknownExtraArgument=unknown extra argument -X {0} specified
 unknownMergeStrategy=unknown merge strategy {0} specified
 unknownSubcommand=Unknown subcommand: {0}
 unmergedPaths=Unmerged paths:
@@ -226,6 +228,7 @@
 usage_Aggressive=This option will cause gc to more aggressively optimize the repository at the expense of taking much more time
 usage_AlwaysFallback=Show uniquely abbreviated commit object as fallback
 usage_bareClone=Make a bare Git repository. That is, instead of creating [DIRECTORY] and placing the administrative files in [DIRECTORY]/.git, make the [DIRECTORY] itself the $GIT_DIR.
+usage_extraArgument=Pass an extra argument to a merge driver. Currently supported are "-X ours" and "-X theirs".
 usage_mirrorClone=Set up a mirror of the source repository. This implies --bare. Compared to --bare, --mirror not only maps \
 local branches of the source to local branches of the target, it maps all refs (including remote-tracking branches, notes etc.) \
 and sets up a refspec configuration such that all these refs are overwritten by a git remote update in the target repository.
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java
index fdc449e..ca4877f 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java
@@ -24,6 +24,7 @@
 import org.eclipse.jgit.lib.Constants;
 import org.eclipse.jgit.lib.ObjectId;
 import org.eclipse.jgit.lib.Ref;
+import org.eclipse.jgit.merge.ContentMergeStrategy;
 import org.eclipse.jgit.merge.MergeStrategy;
 import org.eclipse.jgit.merge.ResolveMerger.MergeFailureReason;
 import org.eclipse.jgit.pgm.internal.CLIText;
@@ -69,6 +70,20 @@
 	@Option(name = "-m", usage = "usage_message")
 	private String message;
 
+	private ContentMergeStrategy contentStrategy = null;
+
+	@Option(name = "--strategy-option", aliases = { "-X" },
+			metaVar = "metaVar_extraArgument", usage = "usage_extraArgument")
+	void extraArg(String name) {
+		if (ContentMergeStrategy.OURS.name().equalsIgnoreCase(name)) {
+			contentStrategy = ContentMergeStrategy.OURS;
+		} else if (ContentMergeStrategy.THEIRS.name().equalsIgnoreCase(name)) {
+			contentStrategy = ContentMergeStrategy.THEIRS;
+		} else {
+			throw die(MessageFormat.format(CLIText.get().unknownExtraArgument, name));
+		}
+	}
+
 	/** {@inheritDoc} */
 	@Override
 	protected void run() {
@@ -96,8 +111,11 @@
 			Ref oldHead = getOldHead();
 			MergeResult result;
 			try (Git git = new Git(db)) {
-				MergeCommand mergeCmd = git.merge().setStrategy(mergeStrategy)
-						.setSquash(squash).setFastForward(ff)
+				MergeCommand mergeCmd = git.merge()
+						.setStrategy(mergeStrategy)
+						.setContentMergeStrategy(contentStrategy)
+						.setSquash(squash)
+						.setFastForward(ff)
 						.setCommit(!noCommit);
 				if (srcRef != null) {
 					mergeCmd.include(srcRef);
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java
index 822f899..696a924 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java
@@ -129,6 +129,9 @@
 			walk.setTreeFilter(AndTreeFilter.create(pathFilter,
 					TreeFilter.ANY_DIFF));
 		}
+		if (parents) {
+			walk.setRewriteParents(true);
+		}
 
 		if (revLimiter.size() == 1)
 			walk.setRevFilter(revLimiter.get(0));
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java
index 991b3ba..8e49a76 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java
@@ -284,6 +284,7 @@
 	/***/ public String tooManyRefsGiven;
 	/***/ public String treeIsRequired;
 	/***/ public char[] unknownIoErrorStdout;
+	/***/ public String unknownExtraArgument;
 	/***/ public String unknownMergeStrategy;
 	/***/ public String unknownSubcommand;
 	/***/ public String unmergedPaths;
diff --git a/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF
index 0d83eb3..2a905a1 100644
--- a/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.ssh.apache.test
 Bundle-SymbolicName: org.eclipse.jgit.ssh.apache.test
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
@@ -20,15 +20,15 @@
  org.apache.sshd.core;version="[2.6.0,2.7.0)",
  org.apache.sshd.server;version="[2.6.0,2.7.0)",
  org.apache.sshd.server.forward;version="[2.6.0,2.7.0)",
- org.eclipse.jgit.api;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.api.errors;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.transport.sshd.proxy;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.junit;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.junit.ssh;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lib;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport.sshd;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util;version="[5.11.2,5.12.0)",
+ org.eclipse.jgit.api;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.api.errors;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.transport.sshd.proxy;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.junit;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.junit.ssh;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lib;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport.sshd;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util;version="[5.12.1,5.13.0)",
  org.junit;version="[4.13,5.0.0)",
  org.junit.experimental.theories;version="[4.13,5.0.0)",
  org.junit.runner;version="[4.13,5.0.0)"
diff --git a/org.eclipse.jgit.ssh.apache.test/pom.xml b/org.eclipse.jgit.ssh.apache.test/pom.xml
index 67ac7c1..5af16c7 100644
--- a/org.eclipse.jgit.ssh.apache.test/pom.xml
+++ b/org.eclipse.jgit.ssh.apache.test/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.ssh.apache.test</artifactId>
diff --git a/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF
index 8fce3c5..0645964 100644
--- a/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF
@@ -6,9 +6,9 @@
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
 Bundle-ActivationPolicy: lazy
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Export-Package: org.eclipse.jgit.internal.transport.sshd;version="5.11.2";x-internal:=true;
+Export-Package: org.eclipse.jgit.internal.transport.sshd;version="5.12.1";x-internal:=true;
   uses:="org.apache.sshd.client,
    org.apache.sshd.client.auth,
    org.apache.sshd.client.auth.keyboard,
@@ -23,9 +23,9 @@
    org.apache.sshd.common.signature,
    org.apache.sshd.common.util.buffer,
    org.eclipse.jgit.transport",
- org.eclipse.jgit.internal.transport.sshd.auth;version="5.11.2";x-internal:=true,
- org.eclipse.jgit.internal.transport.sshd.proxy;version="5.11.2";x-friends:="org.eclipse.jgit.ssh.apache.test",
- org.eclipse.jgit.transport.sshd;version="5.11.2";
+ org.eclipse.jgit.internal.transport.sshd.auth;version="5.12.1";x-internal:=true,
+ org.eclipse.jgit.internal.transport.sshd.proxy;version="5.12.1";x-friends:="org.eclipse.jgit.ssh.apache.test",
+ org.eclipse.jgit.transport.sshd;version="5.12.1";
   uses:="org.eclipse.jgit.transport,
    org.apache.sshd.client.config.hosts,
    org.apache.sshd.common.keyprovider,
@@ -59,6 +59,8 @@
  org.apache.sshd.common.helpers;version="[2.6.0,2.7.0)",
  org.apache.sshd.common.io;version="[2.6.0,2.7.0)",
  org.apache.sshd.common.kex;version="[2.6.0,2.7.0)",
+ org.apache.sshd.common.kex.extension;version="[2.6.0,2.7.0)",
+ org.apache.sshd.common.kex.extension.parser;version="[2.6.0,2.7.0)",
  org.apache.sshd.common.keyprovider;version="[2.6.0,2.7.0)",
  org.apache.sshd.common.mac;version="[2.6.0,2.7.0)",
  org.apache.sshd.common.random;version="[2.6.0,2.7.0)",
@@ -78,12 +80,12 @@
  org.apache.sshd.sftp;version="[2.6.0,2.7.0)",
  org.apache.sshd.sftp.client;version="[2.6.0,2.7.0)",
  org.apache.sshd.sftp.common;version="[2.6.0,2.7.0)",
- org.eclipse.jgit.annotations;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.errors;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.fnmatch;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.transport.ssh;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.nls;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util;version="[5.11.2,5.12.0)",
+ org.eclipse.jgit.annotations;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.errors;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.fnmatch;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.transport.ssh;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.nls;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util;version="[5.12.1,5.13.0)",
  org.slf4j;version="[1.7.0,2.0.0)"
diff --git a/org.eclipse.jgit.ssh.apache/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.ssh.apache/META-INF/SOURCE-MANIFEST.MF
index 4a196fe..80a27d4 100644
--- a/org.eclipse.jgit.ssh.apache/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.apache/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@
 Bundle-Name: org.eclipse.jgit.ssh.apache - Sources
 Bundle-SymbolicName: org.eclipse.jgit.ssh.apache.source
 Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.11.2.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.ssh.apache;version="5.11.2.qualifier";roots="."
+Bundle-Version: 5.12.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.ssh.apache;version="5.12.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.ssh.apache/pom.xml b/org.eclipse.jgit.ssh.apache/pom.xml
index aca0dd4..f754a3a 100644
--- a/org.eclipse.jgit.ssh.apache/pom.xml
+++ b/org.eclipse.jgit.ssh.apache/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.ssh.apache</artifactId>
diff --git a/org.eclipse.jgit.ssh.apache/resources/org/eclipse/jgit/internal/transport/sshd/SshdText.properties b/org.eclipse.jgit.ssh.apache/resources/org/eclipse/jgit/internal/transport/sshd/SshdText.properties
index 16b5738..5bc0867 100644
--- a/org.eclipse.jgit.ssh.apache/resources/org/eclipse/jgit/internal/transport/sshd/SshdText.properties
+++ b/org.eclipse.jgit.ssh.apache/resources/org/eclipse/jgit/internal/transport/sshd/SshdText.properties
@@ -24,7 +24,6 @@
 keyEncryptedRetry=Encrypted key ''{0}'' could not be decrypted. Enter the passphrase again.
 keyLoadFailed=Could not load key ''{0}''
 knownHostsCouldNotUpdate=Could not update known hosts file {0}
-knownHostsFileLockedRead=Could not read known hosts file (locked) {0}
 knownHostsFileLockedUpdate=Could not update known hosts file (locked) {0}
 knownHostsFileReadFailed=Failed to read known hosts file {0}
 knownHostsInvalidLine=Known hosts file {0} contains invalid line {1}
@@ -76,6 +75,9 @@
 proxySocksUnexpectedMessage=Unexpected message received from SOCKS5 proxy {0}; client state {1}: {2}
 proxySocksUnexpectedVersion=Expected SOCKS version 5, got {0}
 proxySocksUsernameTooLong=User name for proxy {0} must be at most 255 bytes long, is {1} bytes: {2}
+pubkeyAuthWrongCommand=Public key authentication received unknown SSH command {0} from {1} ({2})
+pubkeyAuthWrongKey=Public key authentication received wrong key; sent {0}, got back {1} from {2} ({3})
+pubkeyAuthWrongSignatureAlgorithm=Public key authentication requested signature type {0} but got back {1} from {2} ({3})
 serverIdNotReceived=No server identification received within {0} bytes
 serverIdTooLong=Server identification is longer than 255 characters (including line ending): {0}
 serverIdWithNul=Server identification contains a NUL character: {0}
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitKexExtensionHandler.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitKexExtensionHandler.java
new file mode 100644
index 0000000..9446aaa
--- /dev/null
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitKexExtensionHandler.java
@@ -0,0 +1,163 @@
+/*
+ * Copyright (C) 2021 Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.internal.transport.sshd;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.apache.sshd.common.AttributeRepository.AttributeKey;
+import org.apache.sshd.common.NamedFactory;
+import org.apache.sshd.common.kex.KexProposalOption;
+import org.apache.sshd.common.kex.extension.KexExtensionHandler;
+import org.apache.sshd.common.kex.extension.KexExtensions;
+import org.apache.sshd.common.kex.extension.parser.ServerSignatureAlgorithms;
+import org.apache.sshd.common.session.Session;
+import org.apache.sshd.common.signature.Signature;
+import org.apache.sshd.common.util.logging.AbstractLoggingBean;
+import org.eclipse.jgit.util.StringUtils;
+
+/**
+ * Do not use the DefaultClientKexExtensionHandler from sshd; it doesn't work
+ * properly because of misconceptions. See SSHD-1141.
+ *
+ * @see <a href="https://issues.apache.org/jira/browse/SSHD-1141">SSHD-1141</a>
+ */
+public class JGitKexExtensionHandler extends AbstractLoggingBean
+		implements KexExtensionHandler {
+
+	/** Singleton instance. */
+	public static final JGitKexExtensionHandler INSTANCE = new JGitKexExtensionHandler();
+
+	/**
+	 * Session {@link AttributeKey} used to store whether the extension
+	 * indicator was already sent.
+	 */
+	private static final AttributeKey<Boolean> CLIENT_PROPOSAL_MADE = new AttributeKey<>();
+
+	/**
+	 * Session {@link AttributeKey} storing the algorithms announced by the
+	 * server as known.
+	 */
+	public static final AttributeKey<Set<String>> SERVER_ALGORITHMS = new AttributeKey<>();
+
+	private JGitKexExtensionHandler() {
+		// No public instantiation for singleton
+	}
+
+	@Override
+	public boolean isKexExtensionsAvailable(Session session,
+			AvailabilityPhase phase) throws IOException {
+		return !AvailabilityPhase.PREKEX.equals(phase);
+	}
+
+	@Override
+	public void handleKexInitProposal(Session session, boolean initiator,
+			Map<KexProposalOption, String> proposal) throws IOException {
+		// If it's the very first time, we may add the marker telling the server
+		// that we are ready to handle SSH_MSG_EXT_INFO
+		if (session == null || session.isServerSession() || !initiator) {
+			return;
+		}
+		if (session.getAttribute(CLIENT_PROPOSAL_MADE) != null) {
+			return;
+		}
+		String kexAlgorithms = proposal.get(KexProposalOption.SERVERKEYS);
+		if (StringUtils.isEmptyOrNull(kexAlgorithms)) {
+			return;
+		}
+		List<String> algorithms = new ArrayList<>();
+		// We're a client. We mustn't send the server extension, and we should
+		// send the client extension only once.
+		for (String algo : kexAlgorithms.split(",")) { //$NON-NLS-1$
+			if (KexExtensions.CLIENT_KEX_EXTENSION.equalsIgnoreCase(algo)
+					|| KexExtensions.SERVER_KEX_EXTENSION
+							.equalsIgnoreCase(algo)) {
+				continue;
+			}
+			algorithms.add(algo);
+		}
+		// Tell the server that we want to receive SSH2_MSG_EXT_INFO
+		algorithms.add(KexExtensions.CLIENT_KEX_EXTENSION);
+		if (log.isDebugEnabled()) {
+			log.debug(
+					"handleKexInitProposal({}): proposing HostKeyAlgorithms {}", //$NON-NLS-1$
+					session, algorithms);
+		}
+		proposal.put(KexProposalOption.SERVERKEYS,
+				String.join(",", algorithms)); //$NON-NLS-1$
+		session.setAttribute(CLIENT_PROPOSAL_MADE, Boolean.TRUE);
+	}
+
+	@Override
+	public boolean handleKexExtensionRequest(Session session, int index,
+			int count, String name, byte[] data) throws IOException {
+		if (ServerSignatureAlgorithms.NAME.equals(name)) {
+			handleServerSignatureAlgorithms(session,
+					ServerSignatureAlgorithms.INSTANCE.parseExtension(data));
+		}
+		return true;
+	}
+
+	/**
+	 * Perform updates after a server-sig-algs extension has been received.
+	 *
+	 * @param session
+	 *            the message was received for
+	 * @param serverAlgorithms
+	 *            signature algorithm names announced by the server
+	 */
+	protected void handleServerSignatureAlgorithms(Session session,
+			Collection<String> serverAlgorithms) {
+		if (log.isDebugEnabled()) {
+			log.debug("handleServerSignatureAlgorithms({}): {}", session, //$NON-NLS-1$
+					serverAlgorithms);
+		}
+		// Client determines order; server says what it supports. Re-order
+		// such that supported ones are at the front, in client order,
+		// followed by unsupported ones, also in client order.
+		if (serverAlgorithms != null && !serverAlgorithms.isEmpty()) {
+			List<NamedFactory<Signature>> clientAlgorithms = new ArrayList<>(
+					session.getSignatureFactories());
+			if (log.isDebugEnabled()) {
+				log.debug(
+						"handleServerSignatureAlgorithms({}): PubkeyAcceptedAlgorithms before: {}", //$NON-NLS-1$
+						session, clientAlgorithms);
+			}
+			List<NamedFactory<Signature>> unknown = new ArrayList<>();
+			Set<String> known = new TreeSet<>(String.CASE_INSENSITIVE_ORDER);
+			known.addAll(serverAlgorithms);
+			for (Iterator<NamedFactory<Signature>> iter = clientAlgorithms
+					.iterator(); iter.hasNext();) {
+				NamedFactory<Signature> algo = iter.next();
+				if (!known.contains(algo.getName())) {
+					unknown.add(algo);
+					iter.remove();
+				}
+			}
+			// Re-add the unknown ones at the end. Per RFC 8308, some
+			// servers may not announce _all_ their supported algorithms,
+			// and a client may use unknown algorithms.
+			clientAlgorithms.addAll(unknown);
+			if (log.isDebugEnabled()) {
+				log.debug(
+						"handleServerSignatureAlgorithms({}): PubkeyAcceptedAlgorithms after: {}", //$NON-NLS-1$
+						session, clientAlgorithms);
+			}
+			session.setAttribute(SERVER_ALGORITHMS, known);
+			session.setSignatureFactories(clientAlgorithms);
+		}
+	}
+}
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthentication.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthentication.java
index 297b456..6755094 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthentication.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthentication.java
@@ -11,6 +11,9 @@
 
 import java.io.IOException;
 import java.security.PublicKey;
+import java.security.spec.InvalidKeySpecException;
+import java.text.MessageFormat;
+import java.util.Deque;
 import java.util.HashSet;
 import java.util.LinkedList;
 import java.util.List;
@@ -19,6 +22,7 @@
 import org.apache.sshd.client.auth.pubkey.UserAuthPublicKey;
 import org.apache.sshd.client.session.ClientSession;
 import org.apache.sshd.common.NamedFactory;
+import org.apache.sshd.common.NamedResource;
 import org.apache.sshd.common.RuntimeSshException;
 import org.apache.sshd.common.SshConstants;
 import org.apache.sshd.common.config.keys.KeyUtils;
@@ -37,7 +41,9 @@
  */
 public class JGitPublicKeyAuthentication extends UserAuthPublicKey {
 
-	private final List<String> algorithms = new LinkedList<>();
+	private final Deque<String> currentAlgorithms = new LinkedList<>();
+
+	private String chosenAlgorithm;
 
 	JGitPublicKeyAuthentication(List<NamedFactory<Signature>> factories) {
 		super(factories);
@@ -47,11 +53,25 @@
 	protected boolean sendAuthDataRequest(ClientSession session, String service)
 			throws Exception {
 		if (current == null) {
-			algorithms.clear();
+			currentAlgorithms.clear();
+			chosenAlgorithm = null;
 		}
 		String currentAlgorithm = null;
-		if (current != null && !algorithms.isEmpty()) {
-			currentAlgorithm = algorithms.remove(0);
+		if (current != null && !currentAlgorithms.isEmpty()) {
+			currentAlgorithm = currentAlgorithms.poll();
+			if (chosenAlgorithm != null) {
+				Set<String> knownServerAlgorithms = session.getAttribute(
+						JGitKexExtensionHandler.SERVER_ALGORITHMS);
+				if (knownServerAlgorithms != null
+						&& knownServerAlgorithms.contains(chosenAlgorithm)) {
+					// We've tried key 'current' with 'chosenAlgorithm', but it
+					// failed. However, the server had told us it supported
+					// 'chosenAlgorithm'. Thus it makes no sense to continue
+					// with this key and other signature algorithms. Skip to the
+					// next key, if any.
+					currentAlgorithm = null;
+				}
+			}
 		}
 		if (currentAlgorithm == null) {
 			try {
@@ -61,14 +81,13 @@
 								"sendAuthDataRequest({})[{}] no more keys to send", //$NON-NLS-1$
 								session, service);
 					}
+					current = null;
 					return false;
 				}
 				current = keys.next();
-				algorithms.clear();
+				currentAlgorithms.clear();
+				chosenAlgorithm = null;
 			} catch (Error e) { // Copied from superclass
-				warn("sendAuthDataRequest({})[{}] failed ({}) to get next key: {}", //$NON-NLS-1$
-						session, service, e.getClass().getSimpleName(),
-						e.getMessage(), e);
 				throw new RuntimeSshException(e);
 			}
 		}
@@ -76,9 +95,6 @@
 		try {
 			key = current.getPublicKey();
 		} catch (Error e) { // Copied from superclass
-			warn("sendAuthDataRequest({})[{}] failed ({}) to retrieve public key: {}", //$NON-NLS-1$
-					session, service, e.getClass().getSimpleName(),
-					e.getMessage(), e);
 			throw new RuntimeSshException(e);
 		}
 		if (currentAlgorithm == null) {
@@ -94,15 +110,21 @@
 				existingFactories = getSignatureFactories();
 			}
 			if (existingFactories != null) {
+				if (log.isDebugEnabled()) {
+					log.debug(
+							"sendAuthDataRequest({})[{}] selecting from PubKeyAcceptedAlgorithms {}", //$NON-NLS-1$
+							session, service,
+							NamedResource.getNames(existingFactories));
+				}
 				// Select the factories by name and in order
 				existingFactories.forEach(f -> {
 					if (aliases.contains(f.getName())) {
-						algorithms.add(f.getName());
+						currentAlgorithms.add(f.getName());
 					}
 				});
 			}
-			currentAlgorithm = algorithms.isEmpty() ? keyType
-					: algorithms.remove(0);
+			currentAlgorithm = currentAlgorithms.isEmpty() ? keyType
+					: currentAlgorithms.poll();
 		}
 		String name = getName();
 		if (log.isDebugEnabled()) {
@@ -112,6 +134,7 @@
 					KeyUtils.getFingerPrint(key));
 		}
 
+		chosenAlgorithm = currentAlgorithm;
 		Buffer buffer = session
 				.createBuffer(SshConstants.SSH_MSG_USERAUTH_REQUEST);
 		buffer.putString(session.getUsername());
@@ -125,9 +148,77 @@
 	}
 
 	@Override
+	protected boolean processAuthDataRequest(ClientSession session,
+			String service, Buffer buffer) throws Exception {
+		String name = getName();
+		int cmd = buffer.getUByte();
+		if (cmd != SshConstants.SSH_MSG_USERAUTH_PK_OK) {
+			throw new IllegalStateException(MessageFormat.format(
+					SshdText.get().pubkeyAuthWrongCommand,
+					SshConstants.getCommandMessageName(cmd),
+					session.getConnectAddress(), session.getServerVersion()));
+		}
+		PublicKey key;
+		try {
+			key = current.getPublicKey();
+		} catch (Error e) { // Copied from superclass
+			throw new RuntimeSshException(e);
+		}
+		String rspKeyAlgorithm = buffer.getString();
+		PublicKey rspKey = buffer.getPublicKey();
+		if (log.isDebugEnabled()) {
+			log.debug(
+					"processAuthDataRequest({})[{}][{}] SSH_MSG_USERAUTH_PK_OK type={}, fingerprint={}", //$NON-NLS-1$
+					session, service, name, rspKeyAlgorithm,
+					KeyUtils.getFingerPrint(rspKey));
+		}
+		if (!KeyUtils.compareKeys(rspKey, key)) {
+			throw new InvalidKeySpecException(MessageFormat.format(
+					SshdText.get().pubkeyAuthWrongKey,
+					KeyUtils.getFingerPrint(key),
+					KeyUtils.getFingerPrint(rspKey),
+					session.getConnectAddress(), session.getServerVersion()));
+		}
+		if (!chosenAlgorithm.equalsIgnoreCase(rspKeyAlgorithm)) {
+			// 'algo' SHOULD be the same as 'chosenAlgorithm', which is the one
+			// we sent above. See https://tools.ietf.org/html/rfc4252#page-9 .
+			//
+			// However, at least Github (SSH-2.0-babeld-383743ad) servers seem
+			// to return the key type, not the algorithm name.
+			//
+			// So we don't check but just log the inconsistency. We sign using
+			// 'chosenAlgorithm' in any case, so we don't really care what the
+			// server says here.
+			log.warn(MessageFormat.format(
+					SshdText.get().pubkeyAuthWrongSignatureAlgorithm,
+					chosenAlgorithm, rspKeyAlgorithm, session.getConnectAddress(),
+					session.getServerVersion()));
+		}
+		String username = session.getUsername();
+		Buffer out = session
+				.createBuffer(SshConstants.SSH_MSG_USERAUTH_REQUEST);
+		out.putString(username);
+		out.putString(service);
+		out.putString(name);
+		out.putBoolean(true);
+		out.putString(chosenAlgorithm);
+		out.putPublicKey(key);
+		if (log.isDebugEnabled()) {
+			log.debug(
+					"processAuthDataRequest({})[{}][{}]: signing with algorithm {}", //$NON-NLS-1$
+					session, service, name, chosenAlgorithm);
+		}
+		appendSignature(session, service, name, username, chosenAlgorithm, key,
+				out);
+		session.writePacket(out);
+		return true;
+	}
+
+	@Override
 	protected void releaseKeys() throws IOException {
-		algorithms.clear();
+		currentAlgorithms.clear();
 		current = null;
+		chosenAlgorithm = null;
 		super.releaseKeys();
 	}
 }
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/OpenSshServerKeyDatabase.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/OpenSshServerKeyDatabase.java
index 47e09b7..1a530b7 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/OpenSshServerKeyDatabase.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/OpenSshServerKeyDatabase.java
@@ -21,6 +21,7 @@
 import java.net.SocketAddress;
 import java.nio.file.Files;
 import java.nio.file.InvalidPathException;
+import java.nio.file.NoSuchFileException;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.security.GeneralSecurityException;
@@ -561,29 +562,17 @@
 		@Override
 		public List<HostEntryPair> get() {
 			Path path = getPath();
-			try {
-				if (checkReloadRequired()) {
-					if (!Files.exists(path)) {
-						// Has disappeared.
-						resetReloadAttributes();
-						return Collections.emptyList();
+			synchronized (this) {
+				try {
+					if (checkReloadRequired()) {
+						entries = reload(getPath());
 					}
-					LockFile lock = new LockFile(path.toFile());
-					if (lock.lock()) {
-						try {
-							entries = reload(getPath());
-						} finally {
-							lock.unlock();
-						}
-					} else {
-						LOG.warn(format(SshdText.get().knownHostsFileLockedRead,
-								path));
-					}
+				} catch (IOException e) {
+					LOG.warn(format(SshdText.get().knownHostsFileReadFailed,
+							path));
 				}
-			} catch (IOException e) {
-				LOG.warn(format(SshdText.get().knownHostsFileReadFailed, path));
+				return Collections.unmodifiableList(entries);
 			}
-			return Collections.unmodifiableList(entries);
 		}
 
 		private List<HostEntryPair> reload(Path path) throws IOException {
@@ -616,7 +605,7 @@
 					}
 				}
 				return newEntries;
-			} catch (FileNotFoundException e) {
+			} catch (FileNotFoundException | NoSuchFileException e) {
 				resetReloadAttributes();
 				return Collections.emptyList();
 			}
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/SshdText.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/SshdText.java
index 4c4ff59..73c2288 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/SshdText.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/SshdText.java
@@ -44,7 +44,6 @@
 	/***/ public String keyEncryptedRetry;
 	/***/ public String keyLoadFailed;
 	/***/ public String knownHostsCouldNotUpdate;
-	/***/ public String knownHostsFileLockedRead;
 	/***/ public String knownHostsFileLockedUpdate;
 	/***/ public String knownHostsFileReadFailed;
 	/***/ public String knownHostsInvalidLine;
@@ -88,6 +87,9 @@
 	/***/ public String proxySocksUnexpectedMessage;
 	/***/ public String proxySocksUnexpectedVersion;
 	/***/ public String proxySocksUsernameTooLong;
+	/***/ public String pubkeyAuthWrongCommand;
+	/***/ public String pubkeyAuthWrongKey;
+	/***/ public String pubkeyAuthWrongSignatureAlgorithm;
 	/***/ public String serverIdNotReceived;
 	/***/ public String serverIdTooLong;
 	/***/ public String serverIdWithNul;
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java
index cad959c..2d7e0c7 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java
@@ -47,6 +47,7 @@
 import org.eclipse.jgit.internal.transport.sshd.AuthenticationCanceledException;
 import org.eclipse.jgit.internal.transport.sshd.CachingKeyPairProvider;
 import org.eclipse.jgit.internal.transport.sshd.GssApiWithMicAuthFactory;
+import org.eclipse.jgit.internal.transport.sshd.JGitKexExtensionHandler;
 import org.eclipse.jgit.internal.transport.sshd.JGitPasswordAuthFactory;
 import org.eclipse.jgit.internal.transport.sshd.JGitPublicKeyAuthFactory;
 import org.eclipse.jgit.internal.transport.sshd.JGitServerKeyVerifier;
@@ -216,6 +217,7 @@
 						new JGitUserInteraction(credentialsProvider));
 				client.setUserAuthFactories(getUserAuthFactories());
 				client.setKeyIdentityProvider(defaultKeysProvider);
+				client.setKexExtensionHandler(JGitKexExtensionHandler.INSTANCE);
 				// JGit-specific things:
 				JGitSshClient jgitClient = (JGitSshClient) client;
 				jgitClient.setKeyCache(getKeyCache());
diff --git a/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF
index a5e4f39..be16ab0 100644
--- a/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF
@@ -3,17 +3,17 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.ssh.jsch.test
 Bundle-SymbolicName: org.eclipse.jgit.ssh.jsch.test
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Import-Package: com.jcraft.jsch;version="[0.1.54,0.2.0)",
- org.eclipse.jgit.errors;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.junit;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.junit.ssh;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lib;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util;version="[5.11.2,5.12.0)",
+ org.eclipse.jgit.errors;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.junit;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.junit.ssh;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lib;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util;version="[5.12.1,5.13.0)",
  org.junit;version="[4.13,5.0.0)",
  org.junit.experimental.theories;version="[4.13,5.0.0)",
  org.junit.runner;version="[4.13,5.0.0)"
diff --git a/org.eclipse.jgit.ssh.jsch.test/pom.xml b/org.eclipse.jgit.ssh.jsch.test/pom.xml
index 18cce42..8c6533c 100644
--- a/org.eclipse.jgit.ssh.jsch.test/pom.xml
+++ b/org.eclipse.jgit.ssh.jsch.test/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.ssh.jsch.test</artifactId>
diff --git a/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java b/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java
index 4c7e99e..93d85e2 100644
--- a/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java
+++ b/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008, 2017 Google Inc. and others
+ * Copyright (C) 2008, 2021 Google Inc. and others
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Distribution License v. 1.0 which is available at
@@ -58,6 +58,7 @@
 		FileUtils.mkdir(configFile.getParentFile());
 
 		mockSystemReader.setProperty(Constants.OS_USER_NAME_KEY, "jex_junit");
+		mockSystemReader.setProperty("TST_VAR", "TEST");
 		osc = new OpenSshConfig(home, configFile);
 	}
 
@@ -497,4 +498,95 @@
 		assertEquals("^ssh-rsa",
 				c.getValue(SshConstants.PUBKEY_ACCEPTED_ALGORITHMS));
 	}
+
+	@Test
+	public void testEnVarSubstitution() throws Exception {
+		config("Host orcz\nIdentityFile /tmp/${TST_VAR}\n"
+				+ "CertificateFile /tmp/${}/foo\nUser ${TST_VAR}\nIdentityAgent /tmp/${TST_VAR/bar");
+		Host h = osc.lookup("orcz");
+		assertNotNull(h);
+		Config c = h.getConfig();
+		assertEquals("/tmp/TEST",
+				c.getValue(SshConstants.IDENTITY_FILE));
+		// No variable name
+		assertEquals("/tmp/${}/foo", c.getValue(SshConstants.CERTIFICATE_FILE));
+		// User doesn't get env var substitution:
+		assertEquals("${TST_VAR}", c.getValue(SshConstants.USER));
+		assertEquals("${TST_VAR}", h.getUser());
+		// Unterminated:
+		assertEquals("/tmp/${TST_VAR/bar",
+				c.getValue(SshConstants.IDENTITY_AGENT));
+	}
+
+	@Test
+	public void testNegativeMatch() throws Exception {
+		config("Host foo.bar !foobar.baz *.baz\n" + "Port 29418\n");
+		Host h = osc.lookup("foo.bar");
+		assertNotNull(h);
+		assertEquals(29418, h.getPort());
+		h = osc.lookup("foobar.baz");
+		assertNotNull(h);
+		assertEquals(22, h.getPort());
+		h = osc.lookup("foo.baz");
+		assertNotNull(h);
+		assertEquals(29418, h.getPort());
+	}
+
+	@Test
+	public void testNegativeMatch2() throws Exception {
+		// Negative match after the positive match.
+		config("Host foo.bar *.baz !foobar.baz\n" + "Port 29418\n");
+		Host h = osc.lookup("foo.bar");
+		assertNotNull(h);
+		assertEquals(29418, h.getPort());
+		h = osc.lookup("foobar.baz");
+		assertNotNull(h);
+		assertEquals(22, h.getPort());
+		h = osc.lookup("foo.baz");
+		assertNotNull(h);
+		assertEquals(29418, h.getPort());
+	}
+
+	@Test
+	public void testNoMatch() throws Exception {
+		config("Host !host1 !host2\n" + "Port 29418\n");
+		Host h = osc.lookup("host1");
+		assertNotNull(h);
+		assertEquals(22, h.getPort());
+		h = osc.lookup("host2");
+		assertNotNull(h);
+		assertEquals(22, h.getPort());
+		h = osc.lookup("host3");
+		assertNotNull(h);
+		assertEquals(22, h.getPort());
+	}
+
+	@Test
+	public void testMultipleMatch() throws Exception {
+		config("Host foo.bar\nPort 29418\nIdentityFile /foo\n\n"
+				+ "Host *.bar\nPort 22\nIdentityFile /bar\n"
+				+ "Host foo.bar\nPort 47\nIdentityFile /baz\n");
+		Host h = osc.lookup("foo.bar");
+		assertNotNull(h);
+		assertEquals(29418, h.getPort());
+		assertArrayEquals(new Object[] { "/foo", "/bar", "/baz" },
+				h.getConfig().getValues("IdentityFile"));
+	}
+
+	@Test
+	public void testWhitespace() throws Exception {
+		config("Host foo \tbar   baz\nPort 29418\n");
+		Host h = osc.lookup("foo");
+		assertNotNull(h);
+		assertEquals(29418, h.getPort());
+		h = osc.lookup("bar");
+		assertNotNull(h);
+		assertEquals(29418, h.getPort());
+		h = osc.lookup("baz");
+		assertNotNull(h);
+		assertEquals(29418, h.getPort());
+		h = osc.lookup("\tbar");
+		assertNotNull(h);
+		assertEquals(22, h.getPort());
+	}
 }
diff --git a/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF
index d7e868f..0ae2867 100644
--- a/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF
@@ -3,24 +3,24 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.ssh.jsch
 Bundle-SymbolicName: org.eclipse.jgit.ssh.jsch;singleton:=true
-Fragment-Host: org.eclipse.jgit;bundle-version="[5.11.2,5.12.0)"
+Fragment-Host: org.eclipse.jgit;bundle-version="[5.12.1,5.13.0)"
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
 Bundle-ActivationPolicy: lazy
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Export-Package: org.eclipse.jgit.internal.transport.jsch;version="5.11.2";x-friends:="org.eclipse.egit.core",
- org.eclipse.jgit.transport;version="5.11.2";
+Export-Package: org.eclipse.jgit.internal.transport.jsch;version="5.12.1";x-friends:="org.eclipse.egit.core",
+ org.eclipse.jgit.transport;version="5.12.1";
   uses:="org.eclipse.jgit.transport,
    org.eclipse.jgit.internal.transport.ssh,
    org.eclipse.jgit.util,
    com.jcraft.jsch"
 Import-Package: com.jcraft.jsch;version="[0.1.37,0.2.0)",
- org.eclipse.jgit.errors;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.transport.ssh;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.nls;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util.io;version="[5.11.2,5.12.0)",
+ org.eclipse.jgit.errors;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.transport.ssh;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.nls;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util.io;version="[5.12.1,5.13.0)",
  org.slf4j;version="[1.7.0,2.0.0)"
diff --git a/org.eclipse.jgit.ssh.jsch/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.ssh.jsch/META-INF/SOURCE-MANIFEST.MF
index 64a37b7..8a4342b 100644
--- a/org.eclipse.jgit.ssh.jsch/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.jsch/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@
 Bundle-Name: org.eclipse.jgit.ssh.jsch - Sources
 Bundle-SymbolicName: org.eclipse.jgit.ssh.jsch.source
 Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.11.2.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.ssh.jsch;version="5.11.2.qualifier";roots="."
+Bundle-Version: 5.12.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.ssh.jsch;version="5.12.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.ssh.jsch/pom.xml b/org.eclipse.jgit.ssh.jsch/pom.xml
index d6c2be4..2bbbe64 100644
--- a/org.eclipse.jgit.ssh.jsch/pom.xml
+++ b/org.eclipse.jgit.ssh.jsch/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.ssh.jsch</artifactId>
diff --git a/org.eclipse.jgit.test/.settings/org.eclipse.core.resources.prefs b/org.eclipse.jgit.test/.settings/org.eclipse.core.resources.prefs
index 6a9621d..cddb99d 100644
--- a/org.eclipse.jgit.test/.settings/org.eclipse.core.resources.prefs
+++ b/org.eclipse.jgit.test/.settings/org.eclipse.core.resources.prefs
@@ -1,5 +1,6 @@
-#Sat Dec 20 21:21:24 CET 2008
 eclipse.preferences.version=1
+encoding//tst-rsrc/org/eclipse/jgit/diff/umlaut.patch=ISO-8859-1
+encoding//tst-rsrc/org/eclipse/jgit/diff/umlaut_PostImage=ISO-8859-1
 encoding//tst-rsrc/org/eclipse/jgit/patch/testGetText_BothISO88591.patch=ISO-8859-1
 encoding//tst-rsrc/org/eclipse/jgit/patch/testGetText_Convert.patch=ISO-8859-1
 encoding//tst-rsrc/org/eclipse/jgit/patch/testGetText_DiffCc.patch=ISO-8859-1
diff --git a/org.eclipse.jgit.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.test/META-INF/MANIFEST.MF
index c68c0bc..2fba2d3 100644
--- a/org.eclipse.jgit.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.test/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.test
 Bundle-SymbolicName: org.eclipse.jgit.test
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
 Bundle-Localization: plugin
 Bundle-Vendor: %Bundle-Vendor
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
@@ -16,59 +16,59 @@
  org.apache.commons.compress.compressors.gzip;version="[1.15.0,2.0)",
  org.apache.commons.compress.compressors.xz;version="[1.15.0,2.0)",
  org.assertj.core.api;version="[3.14.0,4.0.0)",
- org.eclipse.jgit.annotations;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.api;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.api.errors;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.archive;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.attributes;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.awtui;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.blame;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.diff;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.dircache;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.errors;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.events;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.fnmatch;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.gitrepo;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.hooks;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.ignore;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.ignore.internal;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.fsck;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.revwalk;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.storage.dfs;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.storage.io;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.storage.pack;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.storage.reftable;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.transport.connectivity;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.transport.http;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.internal.transport.parser;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.junit;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.junit.time;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lfs;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lib;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lib.internal;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.logging;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.merge;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.nls;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.notes;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.patch;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.pgm;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.pgm.internal;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.revplot;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.revwalk;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.revwalk.filter;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.storage.file;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.storage.pack;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.submodule;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport.http;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport.resolver;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.treewalk;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.treewalk.filter;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util.io;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util.sha1;version="[5.11.2,5.12.0)",
+ org.eclipse.jgit.annotations;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.api;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.api.errors;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.archive;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.attributes;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.awtui;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.blame;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.diff;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.dircache;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.errors;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.events;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.fnmatch;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.gitrepo;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.hooks;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.ignore;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.ignore.internal;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.fsck;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.revwalk;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.storage.dfs;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.storage.io;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.storage.pack;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.storage.reftable;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.transport.connectivity;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.transport.http;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.internal.transport.parser;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.junit;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.junit.time;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lfs;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lib;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lib.internal;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.logging;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.merge;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.nls;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.notes;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.patch;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.pgm;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.pgm.internal;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.revplot;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.revwalk;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.revwalk.filter;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.storage.file;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.storage.pack;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.submodule;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport.http;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport.resolver;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.treewalk;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.treewalk.filter;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util.io;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util.sha1;version="[5.12.1,5.13.0)",
  org.junit;version="[4.13,5.0.0)",
  org.junit.experimental.theories;version="[4.13,5.0.0)",
  org.junit.function;version="[4.13.0,5.0.0)",
diff --git a/org.eclipse.jgit.test/exttst/org/eclipse/jgit/internal/storage/file/CGitLockFileTest.java b/org.eclipse.jgit.test/exttst/org/eclipse/jgit/internal/storage/file/CGitLockFileTest.java
new file mode 100644
index 0000000..4c19475
--- /dev/null
+++ b/org.eclipse.jgit.test/exttst/org/eclipse/jgit/internal/storage/file/CGitLockFileTest.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2021 SAP SE and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.internal.storage.file;
+
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.jgit.api.Git;
+import org.eclipse.jgit.junit.RepositoryTestCase;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.util.FS;
+import org.eclipse.jgit.util.FS.ExecutionResult;
+import org.junit.Test;
+
+/**
+ * Unit tests of {@link LockFile} testing interoperability with C git
+ */
+public class CGitLockFileTest extends RepositoryTestCase {
+
+	@Test
+	public void testLockedTwiceFails() throws Exception {
+		try (Git git = new Git(db)) {
+			writeTrashFile("file.txt", "content");
+			git.add().addFilepattern("file.txt").call();
+			RevCommit commit1 = git.commit().setMessage("create file").call();
+
+			assertNotNull(commit1);
+			writeTrashFile("file.txt", "content2");
+			git.add().addFilepattern("file.txt").call();
+			assertNotNull(git.commit().setMessage("edit file").call());
+
+			LockFile lf = new LockFile(db.getIndexFile());
+			assertTrue(lf.lock());
+			try {
+				String[] command = new String[] { "git", "checkout",
+						commit1.name() };
+				ProcessBuilder pb = new ProcessBuilder(command);
+				pb.directory(db.getWorkTree());
+				ExecutionResult result = FS.DETECTED.execute(pb, null);
+				assertNotEquals(0, result.getRc());
+				String err = result.getStderr().toString().split("\\R")[0];
+				assertTrue(err.matches(
+						"fatal: Unable to create .*/\\.git/index\\.lock': File exists\\."));
+			} finally {
+				lf.unlock();
+			}
+		}
+	}
+}
diff --git a/org.eclipse.jgit.test/pom.xml b/org.eclipse.jgit.test/pom.xml
index 8a59070..3224e99 100644
--- a/org.eclipse.jgit.test/pom.xml
+++ b/org.eclipse.jgit.test/pom.xml
@@ -19,7 +19,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.test</artifactId>
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/.gitattributes b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/.gitattributes
index c5831d9..28caa2f 100644
--- a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/.gitattributes
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/.gitattributes
@@ -1,3 +1,5 @@
 *.patch -crlf
 *Image -crlf
 *.out -crlf
+delta* -text
+literal* -text
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf.patch
new file mode 100644
index 0000000..01eb0b9
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf.patch
@@ -0,0 +1,9 @@
+diff --git a/crlf b/crlf
+index 9206ee6..95dd193 100644
+--- a/crlf
++++ b/crlf
+@@ -1,3 +1,3 @@
+ foo
+-fie
++bar
+ fum
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf2.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf2.patch
new file mode 100644
index 0000000..5a62104
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf2.patch
@@ -0,0 +1,9 @@
+diff --git a/crlf2 b/crlf2
+index 05c1c78..91e246d 100644
+--- a/crlf2
++++ b/crlf2
+@@ -1,3 +1,3 @@
+ foo

+-fie

++bar

+ fum

diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf2_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf2_PostImage
new file mode 100644
index 0000000..91e246d
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf2_PostImage
@@ -0,0 +1,3 @@
+foo

+bar

+fum

diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf2_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf2_PreImage
new file mode 100644
index 0000000..05c1c78
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf2_PreImage
@@ -0,0 +1,3 @@
+foo

+fie

+fum

diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf3.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf3.patch
new file mode 100644
index 0000000..b155148
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf3.patch
@@ -0,0 +1,8 @@
+diff --git a/crlf3 b/crlf3
+index e69de29..9206ee6 100644
+--- a/crlf3
++++ b/crlf3
+@@ -0,0 +1,3 @@
++foo
++fie
++fum
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf3_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf3_PostImage
new file mode 100644
index 0000000..05c1c78
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf3_PostImage
@@ -0,0 +1,3 @@
+foo

+fie

+fum

diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf3_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf3_PreImage
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf3_PreImage
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf4.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf4.patch
new file mode 100644
index 0000000..0cf6063
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf4.patch
@@ -0,0 +1,9 @@
+diff --git a/crlf4 b/crlf4
+new file mode 100644
+index 0000000..9206ee6
+--- /dev/null
++++ b/crlf4
+@@ -0,0 +1,3 @@
++foo
++fie
++fum
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf4_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf4_PostImage
new file mode 100644
index 0000000..05c1c78
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf4_PostImage
@@ -0,0 +1,3 @@
+foo

+fie

+fum

diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf_PostImage
new file mode 100644
index 0000000..91e246d
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf_PostImage
@@ -0,0 +1,3 @@
+foo

+bar

+fum

diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf_PreImage
new file mode 100644
index 0000000..05c1c78
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/crlf_PreImage
@@ -0,0 +1,3 @@
+foo

+fie

+fum

diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/delta.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/delta.patch
new file mode 100644
index 0000000..8485530
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/delta.patch
@@ -0,0 +1,8 @@
+diff --git a/delta b/delta
+index b4527005bf9e4da2dd1d7185b51bdac623a4218f..8b370bb5f2bc3261b6b62e80d6edd784a61ec225 100644
+GIT binary patch
+delta 14
+ScmZp0Xmwa1z*+$U3j_csN(Dmz
+
+delta 12
+TcmZp5XmD5{u!xa=5hEi28?FP4
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/delta_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/delta_PostImage
new file mode 100644
index 0000000..8b370bb
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/delta_PostImage
Binary files differ
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/delta_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/delta_PreImage
new file mode 100644
index 0000000..b452700
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/delta_PreImage
Binary files differ
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/emptyLine.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/emptyLine.patch
new file mode 100644
index 0000000..18c80c4
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/emptyLine.patch
@@ -0,0 +1,10 @@
+diff --git a/emptyLine b/emptyLine
+index 1fd3fa2..45c2c9b 100644
+--- a/emptyLine
++++ b/emptyLine
+@@ -1,4 +1,4 @@
+ foo
+
+-fie
++bar
+ fum
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/emptyLine_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/emptyLine_PostImage
new file mode 100644
index 0000000..45c2c9b
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/emptyLine_PostImage
@@ -0,0 +1,4 @@
+foo
+
+bar
+fum
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/emptyLine_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/emptyLine_PreImage
new file mode 100644
index 0000000..1fd3fa2
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/emptyLine_PreImage
@@ -0,0 +1,4 @@
+foo
+
+fie
+fum
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/hello.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/hello.patch
new file mode 100644
index 0000000..f015a38
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/hello.patch
@@ -0,0 +1,16 @@
+diff --git a/hello b/hello
+index b6fc4c6..0abaeaa 100644
+--- a/hello
++++ b/hello
+@@ -1 +1 @@
+-hello
+\ No newline at end of file
++bye
+\ No newline at end of file
+diff --git a/yello b/yello
+index 391a8cb..d1ed081 100644
+--- a/yello
++++ b/yello
+@@ -1 +1 @@
+-yello
++yellow
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/hello_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/hello_PostImage
new file mode 100644
index 0000000..0abaeaa
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/hello_PostImage
@@ -0,0 +1 @@
+bye
\ No newline at end of file
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/hello_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/hello_PreImage
new file mode 100644
index 0000000..b6fc4c6
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/hello_PreImage
@@ -0,0 +1 @@
+hello
\ No newline at end of file
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/literal.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/literal.patch
new file mode 100644
index 0000000..c8811d5
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/literal.patch
@@ -0,0 +1,126 @@
+diff --git a/literal b/literal
+index 799df8578e3cae8a5e979182391b8e9a6a3deded..74e4201af6378ac87bf9e118fbab6553c7fd355c 100644
+GIT binary patch
+literal 5389
+zcmc&&X;f25x2=0gFa(g;$fO8C5fl|r2$Mhpf-;XXh+qO@qwRo*3aF3^Peq(ZoX{Y4
+zI{-=?P(d+4RGeCZATuQ301AQ)VKCt)uP*jm>#bhz`}L-^YNgIORkhFFyDIsSoS=YZ
+zn$&4j0Dz{qmq!QyC=5|RQGrv{71I}RA|<%_y8&?Pi28Ue8RkfG$TD|u^R3|*xU(zB
+zZ@K5P&3+xejCMcUc0Y!I$?Wj6>+rQxa)B}|OzgvWV`Bp=t=@L+unvcheY-FGWVHFi
+zl+hUAG;tQLGGOrYEIbZ_wx8)lP#?yGs}Q8a$4&`AtDjvvjQwm{y=_{&ObKM)zwukV
+z?ApAEov=%*pABr(4!6O;+fK5~27)yC*}z_K8|2pNXFEZO(FtixfQbDV^<ft6u(gj}
+zSC|82*zP^S3I<T1uU)sNCEWAL&!)}Kw$+yaA^88K>TUBe=x-IU#ZN;Z$u`KA0EhnA
+zLo!6&-=5&_Z6}_v3(9Hrv4vE{zR(;7T<!3NRBZ_#yzScjq09-#h*cXn+I(!G@U~z_
+z!ZgAPc<`rzP%@*_*SXEl9x^9fBJPDD4z!0H2ur<f+C6N<kOR@qjwlkhU?&cMscqL%
+zhyS<&`_{mT?h_Y5koRY_`V)#E!ww(Ew!gJNMTF1oK6YY%A|N<J!zVCdQQ~h0sY?7N
+zY=lg_C-8mjpg@QKuSpVM*8y8Y5PwM0iU^=@KG0`aBwTIrA}$L;br3g26x*Pj3By~w
+ztf4<$z7B*6Uwg3+lnh_m&u#GW5DpN`f1V|*n|KcdNr+6a?SvdAx`_RujSP6CjnE6<
+z47^st95Hl^IBu6bXFLc#{o$=40ioc^rK_ah|3Fo|$Tx=bzuWUJx)*5{-%L%}w*Bel
+zf`iWvXdK25A&Ten@k#CHlVp=WHM)!ref;*rpnU34L+k$L)@fs>997ReQrr7yVJYLD
+z`dVs3lYV+~Opo@m+<1RMi}Zelv(aO{zFtaOw^J2so#)_}Rh^3mTy5Ulm5u0bd1$sd
+z%1SaNcGG8UC;ePqht{0v`kKJ63u}K_vov5v_U_lm!{_Bh8qW{?ZT<4o4jb||uFmi^
+z30ZU^a{;@{vf9?de5)Ugd$z>m!pd1kt}&nNxfQ%$Cv5tI#JL~tM!fXdm38~gug64p
+zPQHzsxrEPoH~acuuiPqwgeLkX9stl@czd`lPi^UIPuqI(lTP(tdKzaJng-1~7E-it
+z^}F4)Uyk$l@U7J3X7b1TZoizoMla|<)LiP!1Nk#4H#fGIR{!zvUg_6cr7kf6jdd66
+zD!Qc#F=d2LiSHOK8+x;I0C(Yj=B4!G8I;6d7oDZ^(^PBbaSI=dUyaxIy}Ywy^7z`I
+zRoLoo=^Wk)|L%+9vXYI@<NWfT=E$bT^qf>|SURQQGX8NqLpNr;n9In~x$Y`9UUu4b
+z=jT}O9W^IA>!s^fWqQta2@~XR4QTc%_W6`nbn@Ne3#VgO$O3|`e3XWjkL%m<?vOKe
+zb2CqU`O2NWXYrpV!mV5izrz?U9?b^5xQTGb|5BQBGZWPP_web96Qm(opzdnbdm2Fg
+z)o6BNV}K&e1cnnIN3Lp;Sm2+d$HALooxX)yk_}1a(1qLop<2mDTb5wA6*Nu-lN33i
+zg*3>QV8j1RJ?y=7L@4SY`!CkuNp2*<-VN6L3(>ruD2jFae>PqZX-`bsIQ&+JMt{gP
+zMGkCfg<q`wb?lc#E0ep22R3Da>v$FQnqcs~f~OdiY|DPg!rmxM$kF4{{`Zqm(~$&i
+z+QAv2st76{Qlo6S65)=WRxC)<duc}3ce!gr+Sgk%m!7&tp9n1I15p%OBQK2gJ>yUy
+z;w?RL0h<wH!iwS+^y(Xb8ec)9-(Z$tM(IRp6|$}9=bU&q3#`M_$bSBA*j>dV)Qm>*
+zBES}EqfdtubT$WSPJnZ!yI~I$dFb&`ckB_IEzK!M8+oC^5DKk{7mRf$B2MJ7ftooS
+z7m`<B;I}d(T$==0*KNI-t^9`2=zQ)raw`zeA{Z|H?r)t#XGL?JUfR2FTnO<42dpRG
+z%BHiTl&A7So!x2lVkVxOd@ziJJdxGC&P$e>QD_Z3v!u!If;5QIFAc%E+N2j>1FKgg
+z7%ZjHi<qUcGp-~we173yz&%-aHszdq76``Y@>24miQsya7RW(wcks%Keps;zu)b0A
+zs25JPhFO?2aFvEEbVje2)&!nBGNI6va`ZjV^<&<;*oAIbv0|%zcTmYw4&4OpddEAL
+z6i|AB&Whx=JaY`U$^x-?&ZhXh-V_q@PFA<@aasSI*_5LVydg75<c7WbOR?19tEG+`
+zPB12P_t09`-dO1d{gbW&NUl888@|yt-l&!;;py_^Nu<dBKwDc3yvDD~93~QHBFPzX
+z$G#|R)2KvAx@yYAiV3kYcbiuU_N%uvQMREli`W_U?ca#0ykauM*S--sF`dfW4U5wQ
+zE7ub3t|hJ~raAA6P*h`7IkqQrp(Bm+fcs(YV$l>>Np#kd?j=AhtCi>#xxE@)4Jm|^
+z<YR&fD_LoV+<l#m`AP-*>s9C!Q5#be(DKW;PJqrzQr-nDtV8hy!9XcqM*>Kc{Hi)Y
+zPmTmm2c(`po-3dPH8V+oB5Go4z_^Jy6~>KBLl`$QO+h7U>07{50ljGbu$HFq9!STl
+zRQU5*u}TW)qryW}P=qcYIYJU%0T=Mg2!9T1opK-OQxml?Ex>xTe&mRTFc(zdmsR+t
+ztR(Ivu${EFe*mQyVqfLUoaL3f?`<5A#U40Ybl`&(Ya7=bOd)MOJ2G-U=Z>H$_T|0Y
+z^{W@KQn>cOguJ0?aGWf-7(JT(@|I5iBf%`}C~BFpWn|N#tKb_RgYeZTSsi<x{iU7%
+zSYQK|B9*-Z&;2olq8~VrNhdZPJ_S_p^Q7--gBF}2UYx1WojVy6qgjK;A5g4od1O$6
+ztxP<e4W{F1;5+rf#t1`_{+AjO79k9*PGDoF6wx4+EVX)l4|~c~1MY}KXLC*0eD%~E
+zKsN=ekXb`6{dD^z#V6)6K$`}^?x$OJULWGpyb%@&JVN)5wLN*7Y#FoC8_>w02)mW;
+zvgwkPnZPcejj(JX5!D~Nk~Vjrw9#|*0yG^^1WJ@@<2`R|zz2lx1OkxK8@F%oTSx+v
+zp`5$JW&137yLLy#O#u!FXR4^OH*u1oLwc>28fXL7)Um@g{(VmPZizpTP_aRKYb4TI
+z*llsqd3ccr733kJ;G2m^Rr<}i{_2P}cOcP_#NKNavgOg9e~mw%r_cj!h+n+Q(e7dY
+zC7;|xx2D1TQPpU?h~b)&6iQnTo2o=U9Xl>ccTK6SsO(t4G6P%VNTRCVMTO(8c(IO9
+ztdEfH%PZ8bO#&%E{E-yYlWb6<iUXkm>kB6USjj8Yqt(D$@XA3B!#=%_Dwqv+wirB8
+zL^qgwAuxFziHukE)?`+00Gm~<kLn0Bc(3P7HY4^`M<TXk_+)E!s6=B8`KWZKmPi}M
+zhQE?UwF7~O3If|$g#(=o-lQ=K$P>>VH3$dQxU2S<Eo81=NtO7zo(?wp_@^p}09v=v
+zRB`vB&*aK*u$dfGMdcJ!$7rmjWF-LMj|+oCj!1Opu#q*z?li#WVN3GB-n0txTIXaS
+z)DZ^i%a06?X${sVk|)^^g^;D-wad+}dO4a^AV-8#Slv`tV4NEL?8H^8GAf8xM!&nf
+z3phWH5cHj3>gG17fWu(#onhwJB<(sSx0V4UlzdrHG%y;vzb`345ye5k10>)4L5IP;
+zI`Paa7l+a12C$+Z@l=KLP~eg`bYR1*#VVLKkmcS@$g~*cC3h|a5><(KK90MXhsr(-
+zS*DXf9uTQ(;M&~LdwT{0V;*V4H`CKtJ43iN(f5JSYLWRl6-*t-_9iQ%61lUAJ!kUg
+z(L+JGpp!~(Y}EpKiZ`@b=pr(v=o>StUA>||(UbKYh<pR^M0vzL`SdAA9l_mKm$>J5
+z-VuxUVj8GE-%=*eT>9*iKn*b<vDT+}^s$%Ijwp0V@xK6<@2PhcbzSeo7<LfN-!yBM
+zv}W$UKrW6hQpW~I_j2te&mD#%tmsu>4#VW5Z`H%<XGMbT$XQjEZGzhwMbU3v4eT=P
+zjY|H?jI$$!iSvIS8*W@6Q~?FSiC0oaNBxQ-M<Nyo)q%y?@J8uz<KfZZV<z(Tx{^sC
+zcr@U2MgXT%Iy_aZ*iRlqMX4>uP25`v85fP34#l;zORy_|pRt|oo&HcS`K{o|XYD2B
+zJ7zeBa7)ogsKao*=)JgoOWdFR*}770hIp{Vxa^gDK(ef_Bn(Rd&92Af^K>|x*b?pq
+z^dPeNYe@*U035~{RBN)ZOyG{>0&8ibxsV2O6<<kBh_If09@u~;**t9y8LZ~Upa%ix
+zTZs>*3EtogHERT`5X?k$L43Zz2vG&`zYC@zG9><*Ko|Ln#1{*GL0XV_zF;!)3W>if
+zpd#f+`~!h1Qi#Mq5}?RAB(=wijm3dgvIBbgde~LPJMuNM<c44~5{0DpS*^rEz$*Cx
+z-F$7VTXCFxjU=fMaFA(8{3Ss&5;}~$@ZnxUcNonNnMC)+XH(C#mVddvLu0NR)TaB#
+zkIsyT_61PV_1<akF0S8cFKslFlonbi5BKCK)=_DLm31qx?#}DI87GY}<wT8nR`BO4
+zRx@5_a1GE5?KOP2bP+oTyI-K$@K8%uM5Fy!5@TP?;*!xTp2mF~HOQD>yC(Rxh+U4g
+zUUkq6#}v28CoPlCukTBh>Mh`0>y4h}Tg&ESk7r!yE=O>(dSt(ALywPCZytwK9m#d$
+zUPt$*@ckG@_#W!myqe{smjppbnDdfPTRpkQP{j*IeS42pi12jTuZ6ys1T5r_(hW9$
+zdU7+-&x42VYT#sQ({uaa88Y>$n@=VcSoT;2u<YMvKF(5fkq&m{bq7fG%q7;{4ps#M
+z2jqmq)pc{0a@U~^{D3?9_#bL#YMkDbh}h?_+TuG0S=?CECw19NPdE>znU|sX9<|8I
+z#a`x8Ju?m%F#NNYeFlr`c&}3+utiFXL*IBnB%_2G1?n<i?eB)Y8b5lh{8^6OB&|!Z
+z7gJ)$v5+0m{!Z`yz{4P$llNkGja?S8FJcC}v|LM6@lR^{FGiaZ2`S~ew_K#lMC<}A
+zEn3TY#Sg(qe;cE44!G=~--S*oy%n5g?O~Rrf6&RqE&43QVxLbC?J3D^<|ca92Q=zI
+z{!%oniDD7H>1oIEO?&oxik>_V5QV2zH0A7$&pmD5vGXmi?%F>v^^WO~RO=R2-$8j>
+z$9#dRvai_64=G}G`Q{gD#mTbl6~b3Hm)jlbG5!s?KJG3&RG_$|YwdjQi9{E#S|Ew}
+zkgR3d$ZSKM=4o=NyOt`Csy}G%=@s6PWyc6xp66bC`^7jFIWoQ3akGcgz=9JSjufwm
+zP`;}AAj@X6zHDlrem}uB$*zX^8l9|B?|3VpYe?RjSh!xi9$!6|^Xyqm<F<-M=0$Xe
+zYkm2~xE#eoouegx6?I;ojeoG98+^Ty(a;u=hF_kS-<?*<ogLMj+hZJyyi6@C3{+Ab
+z@mUM#KelWycg$|NBVWeB?^w|tM>vH8ll0z*^LmU^ke9M!>G+BM)T9M<yiAc`1=;ka
+z<Zv(3OtFezv?Xrc^FYdb!CCUSW7VjxUT*rh?EA{sHNMSE9UtXqJ<*%X%!dGPCim1>
+zvbft3*&THeF9!a=qS6Gt{Qt`(rJo+ZM=+B3-uVBe{r`m2>TuR2Gvx|d^>(M0_1^{J
+z&OOgkw(AystYHt|E^z)78usIKcv{%8i?zQQxwP+SKCpk(P++5}ym5b3NZWww$fh${
+z+z&czyqYIeTzcz0oSZKBoa(Z#PTn*0gDZ_->&rhr!vd6b34w3Fxi*Jyc-Y>4e@$^4
+cxguN4kni(NU3<6%{;31JJp(*$x^uGr9fGaZv;Y7A
+
+literal 1629
+zcmV-j2BP_iP)<h;3K|Lk000e1NJLTq001BW001Be1^@s6b9#F800004b3#c}2nYxW
+zd<bNS000IQNkl<ZScS!xeQcH08Nh$fdGGB9P;Q}RCD0F7u}~l_3X>XOp-ouEG7tw0
+zrz1-=F%F0OAZ*Bt%4AWe%cd6G%m`sY6u$yfhB9DOrfkevkPjQ|7bz{Y^t;geeV+Z%
+z-b-(9d+9KXPx9t{&pFR|p5ODF^FHT&;Y${|kx3oD%S#{awv*l7K)tMQzWRR$@NLb_
+zw;H}v)GQIf6%3j8H~%fa;jd>h$695QRWckW+^S($6E4nXW;Y+LsHg~iVF2&*`MKhR
+zHmmCQ1byyU`lD^F&Xm<pKK62+wdxsmqG|_L|6&~1bD!4kKAp&iGu%LLdCpHn>|TNV
+z%8R3a_|Tzmm#*3P@Q-HSUYM1eH!<b#!H-eZVZxGBjLfoXADrNsadU=e>c3jMs;&&F
+z8VCRQ^d#Seu9v{M5A2zz4}Ep>n<uhf6p_p+1vzZn`55CfJnY+hl#T1RV8b?1fPFTV
+zMq{}1RLvXzNtgju#D6Av7dYQX?EYncy0!eD=hJtHNE$$UTQ~nWa)NIxE}{6=0&;V+
+zNSKLeLKv&c>a1}yj<<B4tsNF%LuSqsh<Qk$W5YWI51(ur^O}gH4%BIH@8;;=D_OL-
+zgyP!@m^v+w?3^qDfgml-9f=^^DlE+!TezpC>$BEqf8?QeYhH<1JqFP0=f?}mZ~v(g
+zxoJ3q`BNsdeb*C=&+znTPg(oGZ>TsNm*p6-s^<dE)uQU^{eA!w88Fs9)AywRE_>-~
+zo<z<8YO5Qmue&%PLSgx;vV_h7j7ULpIBiX|4d5%!S)|C<QMHv#>5qiMvi`c3fXjnY
+z?nzI>n30qgyK(yTm1Cj+ioF{^3@0CWrSO)>rn{c}{@GoeufLXs+vZGT(^C&#7eYib
+z@v#)Z=<7IOmIA1i6V}+JBXJIJp`n@GI}ZTx-oB4$Ywcp$iqa857|UG%CfGW821q7=
+zq9+APM+z`d>S`Lf|K3fsw_Ssnls$oQ<HruEuZBecMsac?omI_gbs~~-BLDz3)fc$`
+z-e1wt-p#TVrMzFUg##aK;af}Q#pw!orcPa&X4EpdpGluTlGk>l&LdL&c>{lV@vUe(
+zB{i9~>+T+MNs|1@lU%4xMhqz7rXF{kl4D#XI<rJf|J}hcee;cpJz~<*Mw6VBg4gGb
+zooq-lR=Ch_!L_ceK5qAmI2hv|_7ZWTAd$Xz_Z*|K;WE%ypkCQ=fIu+*%<#Kh7hMP!
+z=r839ZtBcdRV$IO`b<Y78%j(+fEkbhUvG%-EPj-E3uaPZcZr7cEpa(i)PL^WtF5k7
+zKc{_3+6ywu7%f6L4wOU{)g}fo*D?^Jr|{7Sp8?<)H^ESE%sf%~un+ua7rY{J06+}0
+zBy8Rps2H|^J|j+2+~rC4Fn?hY0JCP_Lh7i|L+U9?*al+&tkFFXsf0HCR$sKt{%-N*
+z3RR6+FmIp}5m(&$ue@g=bLJKRFlTN7-&`_x$UWlocgCh)3Al~C9R)~fZF~*18f4VZ
+z7oA&Ukw3@K+7SLg7mjhqTqW}hV+`Lhzc5b6=kLU7I5v9W<&&Sk(HI4gO@x470;o9m
+zY+rTyJynfaG+&^Lp59A<M5C)XcqYbh#lf@DF@T<{7x4#s21TzuZbDB++R+zw^S<u0
+z;g3DVz_f{JftkB1C;cKAHg^r29JT@cfi7H53U1dZYR<KAsi_ldm7Uv;a`aFYDEI>1
+zbX{p6Z2g0st1+xPRr~fQk-nI>L$^#A<JHs;1&T!MQ?sAF12H_pkRrHUeIPC;nNZkA
+zAlOSN><5PaL=!6;PSwBuOsthb;@vtaN3H8!fg-Rw7QQgI>Pk?49a|gzM^OzTtUX=(
+z<{t+S#TiXq)6|eE-gzSI0rP_+YmYB4y}5I>Ds?yLyvmA{4domX6nRy|Tb{c@gw3Go
+zSAy>Q%C;02*syDzNaO$;UaV@p5uVP-xx6jWU($8IpY(BDzOQ7j6qV%)(*@c8YURW;
+zzpcp2S4#n^S%{1S+QBwkHC1k7_I_Hk`;+V09uYtc%=Ww#?-e@}G}|!}PU;OD{-Qsp
+bU%LDkMDBWX&Ru`<00000NkvXXu0mjfJA@b~
+
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/literal_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/literal_PostImage
new file mode 100644
index 0000000..74e4201
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/literal_PostImage
Binary files differ
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/literal_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/literal_PreImage
new file mode 100644
index 0000000..799df85
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/literal_PreImage
Binary files differ
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/literal_add.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/literal_add.patch
new file mode 100644
index 0000000..bb6a9e4
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/literal_add.patch
@@ -0,0 +1,40 @@
+diff --git a/literal_add b/literal_add
+new file mode 100644
+index 0000000000000000000000000000000000000000..799df8578e3cae8a5e979182391b8e9a6a3deded
+GIT binary patch
+literal 1629
+zcmV-j2BP_iP)<h;3K|Lk000e1NJLTq001BW001Be1^@s6b9#F800004b3#c}2nYxW
+zd<bNS000IQNkl<ZScS!xeQcH08Nh$fdGGB9P;Q}RCD0F7u}~l_3X>XOp-ouEG7tw0
+zrz1-=F%F0OAZ*Bt%4AWe%cd6G%m`sY6u$yfhB9DOrfkevkPjQ|7bz{Y^t;geeV+Z%
+z-b-(9d+9KXPx9t{&pFR|p5ODF^FHT&;Y${|kx3oD%S#{awv*l7K)tMQzWRR$@NLb_
+zw;H}v)GQIf6%3j8H~%fa;jd>h$695QRWckW+^S($6E4nXW;Y+LsHg~iVF2&*`MKhR
+zHmmCQ1byyU`lD^F&Xm<pKK62+wdxsmqG|_L|6&~1bD!4kKAp&iGu%LLdCpHn>|TNV
+z%8R3a_|Tzmm#*3P@Q-HSUYM1eH!<b#!H-eZVZxGBjLfoXADrNsadU=e>c3jMs;&&F
+z8VCRQ^d#Seu9v{M5A2zz4}Ep>n<uhf6p_p+1vzZn`55CfJnY+hl#T1RV8b?1fPFTV
+zMq{}1RLvXzNtgju#D6Av7dYQX?EYncy0!eD=hJtHNE$$UTQ~nWa)NIxE}{6=0&;V+
+zNSKLeLKv&c>a1}yj<<B4tsNF%LuSqsh<Qk$W5YWI51(ur^O}gH4%BIH@8;;=D_OL-
+zgyP!@m^v+w?3^qDfgml-9f=^^DlE+!TezpC>$BEqf8?QeYhH<1JqFP0=f?}mZ~v(g
+zxoJ3q`BNsdeb*C=&+znTPg(oGZ>TsNm*p6-s^<dE)uQU^{eA!w88Fs9)AywRE_>-~
+zo<z<8YO5Qmue&%PLSgx;vV_h7j7ULpIBiX|4d5%!S)|C<QMHv#>5qiMvi`c3fXjnY
+z?nzI>n30qgyK(yTm1Cj+ioF{^3@0CWrSO)>rn{c}{@GoeufLXs+vZGT(^C&#7eYib
+z@v#)Z=<7IOmIA1i6V}+JBXJIJp`n@GI}ZTx-oB4$Ywcp$iqa857|UG%CfGW821q7=
+zq9+APM+z`d>S`Lf|K3fsw_Ssnls$oQ<HruEuZBecMsac?omI_gbs~~-BLDz3)fc$`
+z-e1wt-p#TVrMzFUg##aK;af}Q#pw!orcPa&X4EpdpGluTlGk>l&LdL&c>{lV@vUe(
+zB{i9~>+T+MNs|1@lU%4xMhqz7rXF{kl4D#XI<rJf|J}hcee;cpJz~<*Mw6VBg4gGb
+zooq-lR=Ch_!L_ceK5qAmI2hv|_7ZWTAd$Xz_Z*|K;WE%ypkCQ=fIu+*%<#Kh7hMP!
+z=r839ZtBcdRV$IO`b<Y78%j(+fEkbhUvG%-EPj-E3uaPZcZr7cEpa(i)PL^WtF5k7
+zKc{_3+6ywu7%f6L4wOU{)g}fo*D?^Jr|{7Sp8?<)H^ESE%sf%~un+ua7rY{J06+}0
+zBy8Rps2H|^J|j+2+~rC4Fn?hY0JCP_Lh7i|L+U9?*al+&tkFFXsf0HCR$sKt{%-N*
+z3RR6+FmIp}5m(&$ue@g=bLJKRFlTN7-&`_x$UWlocgCh)3Al~C9R)~fZF~*18f4VZ
+z7oA&Ukw3@K+7SLg7mjhqTqW}hV+`Lhzc5b6=kLU7I5v9W<&&Sk(HI4gO@x470;o9m
+zY+rTyJynfaG+&^Lp59A<M5C)XcqYbh#lf@DF@T<{7x4#s21TzuZbDB++R+zw^S<u0
+z;g3DVz_f{JftkB1C;cKAHg^r29JT@cfi7H53U1dZYR<KAsi_ldm7Uv;a`aFYDEI>1
+zbX{p6Z2g0st1+xPRr~fQk-nI>L$^#A<JHs;1&T!MQ?sAF12H_pkRrHUeIPC;nNZkA
+zAlOSN><5PaL=!6;PSwBuOsthb;@vtaN3H8!fg-Rw7QQgI>Pk?49a|gzM^OzTtUX=(
+z<{t+S#TiXq)6|eE-gzSI0rP_+YmYB4y}5I>Ds?yLyvmA{4domX6nRy|Tb{c@gw3Go
+zSAy>Q%C;02*syDzNaO$;UaV@p5uVP-xx6jWU($8IpY(BDzOQ7j6qV%)(*@c8YURW;
+zzpcp2S4#n^S%{1S+QBwkHC1k7_I_Hk`;+V09uYtc%=Ww#?-e@}G}|!}PU;OD{-Qsp
+bU%LDkMDBWX&Ru`<00000NkvXXu0mjfJA@b~
+
+literal 0
+HcmV?d00001
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/literal_add_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/literal_add_PostImage
new file mode 100644
index 0000000..799df85
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/literal_add_PostImage
Binary files differ
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/smudgetest.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/smudgetest.patch
new file mode 100644
index 0000000..ab4d426
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/smudgetest.patch
@@ -0,0 +1,9 @@
+diff --git a/smudgetest b/smudgetest
+index a24d41e..762c4d0 100644
+--- a/smudgetest
++++ b/smudgetest
+@@ -1,3 +1,3 @@
+ PERLE
+-HEBLE
++sprich
+ speak
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/smudgetest_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/smudgetest_PostImage
new file mode 100644
index 0000000..ad63089
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/smudgetest_PostImage
@@ -0,0 +1,3 @@
+PARLA
+sprich
+speak
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/smudgetest_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/smudgetest_PreImage
new file mode 100644
index 0000000..9bbd8c7
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/smudgetest_PreImage
@@ -0,0 +1,3 @@
+PARLA
+HABLA
+speak
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/umlaut.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/umlaut.patch
new file mode 100644
index 0000000..7380dbe
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/umlaut.patch
@@ -0,0 +1,7 @@
+diff --git a/umlaut b/umlaut
+index 003a054..557f72f 100644
+--- a/umlaut
++++ b/umlaut
+@@ -1 +1 @@
+-ÄÖÜ
++ÄÖÜ
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/umlaut_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/umlaut_PostImage
new file mode 100644
index 0000000..557f72f
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/umlaut_PostImage
@@ -0,0 +1 @@
+ÄÖÜ
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/umlaut_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/umlaut_PreImage
new file mode 100644
index 0000000..003a054
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/umlaut_PreImage
@@ -0,0 +1 @@
+ÄÖÜ
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/util/io/delta1.forward b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/util/io/delta1.forward
new file mode 100644
index 0000000..878b167
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/util/io/delta1.forward
@@ -0,0 +1 @@
+ScmZp0Xmwa1z*+$U3j_csN(Dmz
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/util/io/delta1.reverse b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/util/io/delta1.reverse
new file mode 100644
index 0000000..7ff7a08
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/util/io/delta1.reverse
@@ -0,0 +1 @@
+TcmZp5XmD5{u!xa=5hEi28?FP4
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ApplyCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ApplyCommandTest.java
index 055eba7..867310b 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ApplyCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ApplyCommandTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011, 2020 IBM Corporation and others
+ * Copyright (C) 2011, 2021 IBM Corporation and others
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Distribution License v. 1.0 which is available at
@@ -9,6 +9,7 @@
  */
 package org.eclipse.jgit.api;
 
+import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
@@ -18,11 +19,20 @@
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
 
 import org.eclipse.jgit.api.errors.PatchApplyException;
 import org.eclipse.jgit.api.errors.PatchFormatException;
+import org.eclipse.jgit.attributes.FilterCommand;
+import org.eclipse.jgit.attributes.FilterCommandFactory;
+import org.eclipse.jgit.attributes.FilterCommandRegistry;
 import org.eclipse.jgit.diff.RawText;
 import org.eclipse.jgit.junit.RepositoryTestCase;
+import org.eclipse.jgit.lib.Config;
+import org.eclipse.jgit.lib.ConfigConstants;
+import org.eclipse.jgit.util.IO;
 import org.junit.Test;
 
 public class ApplyCommandTest extends RepositoryTestCase {
@@ -58,6 +68,260 @@
 	}
 
 	@Test
+	public void testCrLf() throws Exception {
+		try {
+			db.getConfig().setBoolean(ConfigConstants.CONFIG_CORE_SECTION, null,
+					ConfigConstants.CONFIG_KEY_AUTOCRLF, true);
+			ApplyResult result = init("crlf", true, true);
+			assertEquals(1, result.getUpdatedFiles().size());
+			assertEquals(new File(db.getWorkTree(), "crlf"),
+					result.getUpdatedFiles().get(0));
+			checkFile(new File(db.getWorkTree(), "crlf"),
+					b.getString(0, b.size(), false));
+		} finally {
+			db.getConfig().unset(ConfigConstants.CONFIG_CORE_SECTION, null,
+					ConfigConstants.CONFIG_KEY_AUTOCRLF);
+		}
+	}
+
+	@Test
+	public void testCrLfOff() throws Exception {
+		try {
+			db.getConfig().setBoolean(ConfigConstants.CONFIG_CORE_SECTION, null,
+					ConfigConstants.CONFIG_KEY_AUTOCRLF, false);
+			ApplyResult result = init("crlf", true, true);
+			assertEquals(1, result.getUpdatedFiles().size());
+			assertEquals(new File(db.getWorkTree(), "crlf"),
+					result.getUpdatedFiles().get(0));
+			checkFile(new File(db.getWorkTree(), "crlf"),
+					b.getString(0, b.size(), false));
+		} finally {
+			db.getConfig().unset(ConfigConstants.CONFIG_CORE_SECTION, null,
+					ConfigConstants.CONFIG_KEY_AUTOCRLF);
+		}
+	}
+
+	@Test
+	public void testCrLfEmptyCommitted() throws Exception {
+		try {
+			db.getConfig().setBoolean(ConfigConstants.CONFIG_CORE_SECTION, null,
+					ConfigConstants.CONFIG_KEY_AUTOCRLF, true);
+			ApplyResult result = init("crlf3", true, true);
+			assertEquals(1, result.getUpdatedFiles().size());
+			assertEquals(new File(db.getWorkTree(), "crlf3"),
+					result.getUpdatedFiles().get(0));
+			checkFile(new File(db.getWorkTree(), "crlf3"),
+					b.getString(0, b.size(), false));
+		} finally {
+			db.getConfig().unset(ConfigConstants.CONFIG_CORE_SECTION, null,
+					ConfigConstants.CONFIG_KEY_AUTOCRLF);
+		}
+	}
+
+	@Test
+	public void testCrLfNewFile() throws Exception {
+		try {
+			db.getConfig().setBoolean(ConfigConstants.CONFIG_CORE_SECTION, null,
+					ConfigConstants.CONFIG_KEY_AUTOCRLF, true);
+			ApplyResult result = init("crlf4", false, true);
+			assertEquals(1, result.getUpdatedFiles().size());
+			assertEquals(new File(db.getWorkTree(), "crlf4"),
+					result.getUpdatedFiles().get(0));
+			checkFile(new File(db.getWorkTree(), "crlf4"),
+					b.getString(0, b.size(), false));
+		} finally {
+			db.getConfig().unset(ConfigConstants.CONFIG_CORE_SECTION, null,
+					ConfigConstants.CONFIG_KEY_AUTOCRLF);
+		}
+	}
+
+	@Test
+	public void testPatchWithCrLf() throws Exception {
+		try {
+			db.getConfig().setBoolean(ConfigConstants.CONFIG_CORE_SECTION, null,
+					ConfigConstants.CONFIG_KEY_AUTOCRLF, false);
+			ApplyResult result = init("crlf2", true, true);
+			assertEquals(1, result.getUpdatedFiles().size());
+			assertEquals(new File(db.getWorkTree(), "crlf2"),
+					result.getUpdatedFiles().get(0));
+			checkFile(new File(db.getWorkTree(), "crlf2"),
+					b.getString(0, b.size(), false));
+		} finally {
+			db.getConfig().unset(ConfigConstants.CONFIG_CORE_SECTION, null,
+					ConfigConstants.CONFIG_KEY_AUTOCRLF);
+		}
+	}
+
+	@Test
+	public void testPatchWithCrLf2() throws Exception {
+		String name = "crlf2";
+		try (Git git = new Git(db)) {
+			db.getConfig().setBoolean(ConfigConstants.CONFIG_CORE_SECTION, null,
+					ConfigConstants.CONFIG_KEY_AUTOCRLF, false);
+			a = new RawText(readFile(name + "_PreImage"));
+			write(new File(db.getWorkTree(), name),
+					a.getString(0, a.size(), false));
+
+			git.add().addFilepattern(name).call();
+			git.commit().setMessage("PreImage").call();
+
+			b = new RawText(readFile(name + "_PostImage"));
+
+			db.getConfig().setBoolean(ConfigConstants.CONFIG_CORE_SECTION, null,
+					ConfigConstants.CONFIG_KEY_AUTOCRLF, true);
+			ApplyResult result = git.apply()
+					.setPatch(getTestResource(name + ".patch")).call();
+			assertEquals(1, result.getUpdatedFiles().size());
+			assertEquals(new File(db.getWorkTree(), name),
+					result.getUpdatedFiles().get(0));
+			checkFile(new File(db.getWorkTree(), name),
+					b.getString(0, b.size(), false));
+		} finally {
+			db.getConfig().unset(ConfigConstants.CONFIG_CORE_SECTION, null,
+					ConfigConstants.CONFIG_KEY_AUTOCRLF);
+		}
+	}
+
+	// Clean/smudge filter for testFiltering. The smudgetest test resources were
+	// created with C git using a clean filter sed -e "s/A/E/g" and the smudge
+	// filter sed -e "s/E/A/g". To keep the test independent of the presence of
+	// sed, implement this with a built-in filter.
+	private static class ReplaceFilter extends FilterCommand {
+
+		private final char toReplace;
+
+		private final char replacement;
+
+		ReplaceFilter(InputStream in, OutputStream out, char toReplace,
+				char replacement) {
+			super(in, out);
+			this.toReplace = toReplace;
+			this.replacement = replacement;
+		}
+
+		@Override
+		public int run() throws IOException {
+			int b = in.read();
+			if (b < 0) {
+				in.close();
+				out.close();
+				return -1;
+			}
+			if ((b & 0xFF) == toReplace) {
+				b = replacement;
+			}
+			out.write(b);
+			return 1;
+		}
+	}
+
+	@Test
+	public void testFiltering() throws Exception {
+		// Set up filter
+		FilterCommandFactory clean = (repo, in, out) -> {
+			return new ReplaceFilter(in, out, 'A', 'E');
+		};
+		FilterCommandFactory smudge = (repo, in, out) -> {
+			return new ReplaceFilter(in, out, 'E', 'A');
+		};
+		FilterCommandRegistry.register("jgit://builtin/a2e/clean", clean);
+		FilterCommandRegistry.register("jgit://builtin/a2e/smudge", smudge);
+		try (Git git = new Git(db)) {
+			Config config = db.getConfig();
+			config.setString(ConfigConstants.CONFIG_FILTER_SECTION, "a2e",
+					"clean", "jgit://builtin/a2e/clean");
+			config.setString(ConfigConstants.CONFIG_FILTER_SECTION, "a2e",
+					"smudge", "jgit://builtin/a2e/smudge");
+			write(new File(db.getWorkTree(), ".gitattributes"),
+					"smudgetest filter=a2e");
+			git.add().addFilepattern(".gitattributes").call();
+			git.commit().setMessage("Attributes").call();
+			ApplyResult result = init("smudgetest", true, true);
+			assertEquals(1, result.getUpdatedFiles().size());
+			assertEquals(new File(db.getWorkTree(), "smudgetest"),
+					result.getUpdatedFiles().get(0));
+			checkFile(new File(db.getWorkTree(), "smudgetest"),
+					b.getString(0, b.size(), false));
+
+		} finally {
+			// Tear down filter
+			FilterCommandRegistry.unregister("jgit://builtin/a2e/clean");
+			FilterCommandRegistry.unregister("jgit://builtin/a2e/smudge");
+		}
+	}
+
+	private void checkBinary(String name, boolean hasPreImage)
+			throws Exception {
+		checkBinary(name, hasPreImage, 1);
+	}
+
+	private void checkBinary(String name, boolean hasPreImage,
+			int numberOfFiles) throws Exception {
+		try (Git git = new Git(db)) {
+			byte[] post = IO
+					.readWholeStream(getTestResource(name + "_PostImage"), 0)
+					.array();
+			File f = new File(db.getWorkTree(), name);
+			if (hasPreImage) {
+				byte[] pre = IO
+						.readWholeStream(getTestResource(name + "_PreImage"), 0)
+						.array();
+				Files.write(f.toPath(), pre);
+				git.add().addFilepattern(name).call();
+				git.commit().setMessage("PreImage").call();
+			}
+			ApplyResult result = git.apply()
+					.setPatch(getTestResource(name + ".patch")).call();
+			assertEquals(numberOfFiles, result.getUpdatedFiles().size());
+			assertEquals(f, result.getUpdatedFiles().get(0));
+			assertArrayEquals(post, Files.readAllBytes(f.toPath()));
+		}
+	}
+
+	@Test
+	public void testBinaryDelta() throws Exception {
+		checkBinary("delta", true);
+	}
+
+	@Test
+	public void testBinaryLiteral() throws Exception {
+		checkBinary("literal", true);
+	}
+
+	@Test
+	public void testBinaryLiteralAdd() throws Exception {
+		checkBinary("literal_add", false);
+	}
+
+	@Test
+	public void testEncodingChange() throws Exception {
+		// This is a text patch that changes a file containing ÄÖÜ in UTF-8 to
+		// the same characters in ISO-8859-1. The patch file itself uses mixed
+		// encoding. Since checkFile() works with strings use the binary check.
+		checkBinary("umlaut", true);
+	}
+
+	@Test
+	public void testEmptyLine() throws Exception {
+		// C git accepts completely empty lines as empty context lines.
+		// According to comments in the C git sources (apply.c), newer GNU diff
+		// may produce such diffs.
+		checkBinary("emptyLine", true);
+	}
+
+	@Test
+	public void testMultiFileNoNewline() throws Exception {
+		// This test needs two files. One is in the test resources.
+		try (Git git = new Git(db)) {
+			Files.write(db.getWorkTree().toPath().resolve("yello"),
+					"yello".getBytes(StandardCharsets.US_ASCII));
+			git.add().addFilepattern("yello").call();
+			git.commit().setMessage("yello").call();
+		}
+		checkBinary("hello", true, 2);
+	}
+
+	@Test
 	public void testAddA1() throws Exception {
 		ApplyResult result = init("A1", false, true);
 		assertEquals(1, result.getUpdatedFiles().size());
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java
index 9dd129c..f4f0ecd 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java
@@ -34,6 +34,8 @@
 import org.eclipse.jgit.lib.ObjectId;
 import org.eclipse.jgit.lib.ReflogReader;
 import org.eclipse.jgit.lib.RepositoryState;
+import org.eclipse.jgit.merge.ContentMergeStrategy;
+import org.eclipse.jgit.merge.MergeStrategy;
 import org.eclipse.jgit.merge.ResolveMerger.MergeFailureReason;
 import org.eclipse.jgit.revwalk.RevCommit;
 import org.junit.Test;
@@ -193,7 +195,7 @@
 	}
 
 	@Test
-	public void testCherryPickConflictResolutionNoCOmmit() throws Exception {
+	public void testCherryPickConflictResolutionNoCommit() throws Exception {
 		Git git = new Git(db);
 		RevCommit sideCommit = prepareCherryPick(git);
 
@@ -280,6 +282,70 @@
 	}
 
 	@Test
+	public void testCherryPickOurs() throws Exception {
+		try (Git git = new Git(db)) {
+			RevCommit sideCommit = prepareCherryPick(git);
+
+			CherryPickResult result = git.cherryPick()
+					.include(sideCommit.getId())
+					.setStrategy(MergeStrategy.OURS)
+					.call();
+			assertEquals(CherryPickStatus.OK, result.getStatus());
+
+			String expected = "a(master)";
+			checkFile(new File(db.getWorkTree(), "a"), expected);
+		}
+	}
+
+	@Test
+	public void testCherryPickTheirs() throws Exception {
+		try (Git git = new Git(db)) {
+			RevCommit sideCommit = prepareCherryPick(git);
+
+			CherryPickResult result = git.cherryPick()
+					.include(sideCommit.getId())
+					.setStrategy(MergeStrategy.THEIRS)
+					.call();
+			assertEquals(CherryPickStatus.OK, result.getStatus());
+
+			String expected = "a(side)";
+			checkFile(new File(db.getWorkTree(), "a"), expected);
+		}
+	}
+
+	@Test
+	public void testCherryPickXours() throws Exception {
+		try (Git git = new Git(db)) {
+			RevCommit sideCommit = prepareCherryPickStrategyOption(git);
+
+			CherryPickResult result = git.cherryPick()
+					.include(sideCommit.getId())
+					.setContentMergeStrategy(ContentMergeStrategy.OURS)
+					.call();
+			assertEquals(CherryPickStatus.OK, result.getStatus());
+
+			String expected = "a\nmaster\nc\nd\n";
+			checkFile(new File(db.getWorkTree(), "a"), expected);
+		}
+	}
+
+	@Test
+	public void testCherryPickXtheirs() throws Exception {
+		try (Git git = new Git(db)) {
+			RevCommit sideCommit = prepareCherryPickStrategyOption(git);
+
+			CherryPickResult result = git.cherryPick()
+					.include(sideCommit.getId())
+					.setContentMergeStrategy(ContentMergeStrategy.THEIRS)
+					.call();
+			assertEquals(CherryPickStatus.OK, result.getStatus());
+
+			String expected = "a\nside\nc\nd\n";
+			checkFile(new File(db.getWorkTree(), "a"), expected);
+		}
+	}
+
+	@Test
 	public void testCherryPickConflictMarkers() throws Exception {
 		try (Git git = new Git(db)) {
 			RevCommit sideCommit = prepareCherryPick(git);
@@ -384,6 +450,31 @@
 		return sideCommit;
 	}
 
+	private RevCommit prepareCherryPickStrategyOption(Git git)
+			throws Exception {
+		// create, add and commit file a
+		writeTrashFile("a", "a\nb\nc\n");
+		git.add().addFilepattern("a").call();
+		RevCommit firstMasterCommit = git.commit().setMessage("first master")
+				.call();
+
+		// create and checkout side branch
+		createBranch(firstMasterCommit, "refs/heads/side");
+		checkoutBranch("refs/heads/side");
+		// modify, add and commit file a
+		writeTrashFile("a", "a\nside\nc\nd\n");
+		git.add().addFilepattern("a").call();
+		RevCommit sideCommit = git.commit().setMessage("side").call();
+
+		// checkout master branch
+		checkoutBranch("refs/heads/master");
+		// modify, add and commit file a
+		writeTrashFile("a", "a\nmaster\nc\n");
+		git.add().addFilepattern("a").call();
+		git.commit().setMessage("second master").call();
+		return sideCommit;
+	}
+
 	private void doCherryPickAndCheckResult(final Git git,
 			final RevCommit sideCommit, final MergeFailureReason reason)
 			throws Exception {
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java
index 8747c85..bc4e940 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java
@@ -14,6 +14,7 @@
 import static org.eclipse.jgit.lib.Constants.R_HEADS;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
@@ -25,6 +26,7 @@
 
 import org.eclipse.jgit.api.MergeCommand.FastForwardMode;
 import org.eclipse.jgit.api.MergeResult.MergeStatus;
+import org.eclipse.jgit.api.ResetCommand.ResetType;
 import org.eclipse.jgit.api.errors.InvalidMergeHeadsException;
 import org.eclipse.jgit.junit.RepositoryTestCase;
 import org.eclipse.jgit.junit.TestRepository;
@@ -34,6 +36,7 @@
 import org.eclipse.jgit.lib.Repository;
 import org.eclipse.jgit.lib.RepositoryState;
 import org.eclipse.jgit.lib.Sets;
+import org.eclipse.jgit.merge.ContentMergeStrategy;
 import org.eclipse.jgit.merge.MergeStrategy;
 import org.eclipse.jgit.merge.ResolveMerger.MergeFailureReason;
 import org.eclipse.jgit.revwalk.RevCommit;
@@ -306,6 +309,200 @@
 	}
 
 	@Test
+	public void testContentMergeXtheirs() throws Exception {
+		try (Git git = new Git(db)) {
+			writeTrashFile("a", "1\na\n3\n");
+			writeTrashFile("b", "1\nb\n3\n");
+			writeTrashFile("c/c/c", "1\nc\n3\n");
+			git.add().addFilepattern("a").addFilepattern("b")
+					.addFilepattern("c/c/c").call();
+			RevCommit initialCommit = git.commit().setMessage("initial").call();
+
+			createBranch(initialCommit, "refs/heads/side");
+			checkoutBranch("refs/heads/side");
+
+			writeTrashFile("a", "1\na(side)\n3\n4\n");
+			writeTrashFile("b", "1\nb(side)\n3\n4\n");
+			git.add().addFilepattern("a").addFilepattern("b").call();
+			RevCommit secondCommit = git.commit().setMessage("side").call();
+
+			assertEquals("1\nb(side)\n3\n4\n",
+					read(new File(db.getWorkTree(), "b")));
+			checkoutBranch("refs/heads/master");
+			assertEquals("1\nb\n3\n", read(new File(db.getWorkTree(), "b")));
+
+			writeTrashFile("a", "1\na(main)\n3\n");
+			writeTrashFile("c/c/c", "1\nc(main)\n3\n");
+			git.add().addFilepattern("a").addFilepattern("c/c/c").call();
+			git.commit().setMessage("main").call();
+
+			MergeResult result = git.merge().include(secondCommit.getId())
+					.setStrategy(MergeStrategy.RESOLVE)
+					.setContentMergeStrategy(ContentMergeStrategy.THEIRS)
+					.call();
+			assertEquals(MergeStatus.MERGED, result.getMergeStatus());
+
+			assertEquals("1\na(side)\n3\n4\n",
+					read(new File(db.getWorkTree(), "a")));
+			assertEquals("1\nb(side)\n3\n4\n",
+					read(new File(db.getWorkTree(), "b")));
+			assertEquals("1\nc(main)\n3\n",
+					read(new File(db.getWorkTree(), "c/c/c")));
+
+			assertNull(result.getConflicts());
+
+			assertEquals(RepositoryState.SAFE, db.getRepositoryState());
+		}
+	}
+
+	@Test
+	public void testContentMergeXours() throws Exception {
+		try (Git git = new Git(db)) {
+			writeTrashFile("a", "1\na\n3\n");
+			writeTrashFile("b", "1\nb\n3\n");
+			writeTrashFile("c/c/c", "1\nc\n3\n");
+			git.add().addFilepattern("a").addFilepattern("b")
+					.addFilepattern("c/c/c").call();
+			RevCommit initialCommit = git.commit().setMessage("initial").call();
+
+			createBranch(initialCommit, "refs/heads/side");
+			checkoutBranch("refs/heads/side");
+
+			writeTrashFile("a", "1\na(side)\n3\n4\n");
+			writeTrashFile("b", "1\nb(side)\n3\n4\n");
+			git.add().addFilepattern("a").addFilepattern("b").call();
+			RevCommit secondCommit = git.commit().setMessage("side").call();
+
+			assertEquals("1\nb(side)\n3\n4\n",
+					read(new File(db.getWorkTree(), "b")));
+			checkoutBranch("refs/heads/master");
+			assertEquals("1\nb\n3\n", read(new File(db.getWorkTree(), "b")));
+
+			writeTrashFile("a", "1\na(main)\n3\n");
+			writeTrashFile("c/c/c", "1\nc(main)\n3\n");
+			git.add().addFilepattern("a").addFilepattern("c/c/c").call();
+			git.commit().setMessage("main").call();
+
+			MergeResult result = git.merge().include(secondCommit.getId())
+					.setStrategy(MergeStrategy.RESOLVE)
+					.setContentMergeStrategy(ContentMergeStrategy.OURS).call();
+			assertEquals(MergeStatus.MERGED, result.getMergeStatus());
+
+			assertEquals("1\na(main)\n3\n4\n",
+					read(new File(db.getWorkTree(), "a")));
+			assertEquals("1\nb(side)\n3\n4\n",
+					read(new File(db.getWorkTree(), "b")));
+			assertEquals("1\nc(main)\n3\n",
+					read(new File(db.getWorkTree(), "c/c/c")));
+
+			assertNull(result.getConflicts());
+
+			assertEquals(RepositoryState.SAFE, db.getRepositoryState());
+		}
+	}
+
+	@Test
+	public void testBinaryContentMerge() throws Exception {
+		try (Git git = new Git(db)) {
+			writeTrashFile(".gitattributes", "a binary");
+			writeTrashFile("a", "initial");
+			git.add().addFilepattern(".").call();
+			RevCommit initialCommit = git.commit().setMessage("initial").call();
+
+			createBranch(initialCommit, "refs/heads/side");
+			checkoutBranch("refs/heads/side");
+
+			writeTrashFile("a", "side");
+			git.add().addFilepattern("a").call();
+			RevCommit secondCommit = git.commit().setMessage("side").call();
+
+			checkoutBranch("refs/heads/master");
+
+			writeTrashFile("a", "main");
+			git.add().addFilepattern("a").call();
+			git.commit().setMessage("main").call();
+
+			MergeResult result = git.merge().include(secondCommit.getId())
+					.setStrategy(MergeStrategy.RESOLVE).call();
+			assertEquals(MergeStatus.CONFLICTING, result.getMergeStatus());
+
+			assertEquals("main", read(new File(db.getWorkTree(), "a")));
+
+			// Hmmm... there doesn't seem to be a way to figure out which files
+			// had a binary conflict from a MergeResult...
+
+			assertEquals(RepositoryState.MERGING, db.getRepositoryState());
+		}
+	}
+
+	@Test
+	public void testBinaryContentMergeXtheirs() throws Exception {
+		try (Git git = new Git(db)) {
+			writeTrashFile(".gitattributes", "a binary");
+			writeTrashFile("a", "initial");
+			git.add().addFilepattern(".").call();
+			RevCommit initialCommit = git.commit().setMessage("initial").call();
+
+			createBranch(initialCommit, "refs/heads/side");
+			checkoutBranch("refs/heads/side");
+
+			writeTrashFile("a", "side");
+			git.add().addFilepattern("a").call();
+			RevCommit secondCommit = git.commit().setMessage("side").call();
+
+			checkoutBranch("refs/heads/master");
+
+			writeTrashFile("a", "main");
+			git.add().addFilepattern("a").call();
+			git.commit().setMessage("main").call();
+
+			MergeResult result = git.merge().include(secondCommit.getId())
+					.setStrategy(MergeStrategy.RESOLVE)
+					.setContentMergeStrategy(ContentMergeStrategy.THEIRS)
+					.call();
+			assertEquals(MergeStatus.MERGED, result.getMergeStatus());
+
+			assertEquals("side", read(new File(db.getWorkTree(), "a")));
+
+			assertNull(result.getConflicts());
+			assertEquals(RepositoryState.SAFE, db.getRepositoryState());
+		}
+	}
+
+	@Test
+	public void testBinaryContentMergeXours() throws Exception {
+		try (Git git = new Git(db)) {
+			writeTrashFile(".gitattributes", "a binary");
+			writeTrashFile("a", "initial");
+			git.add().addFilepattern(".").call();
+			RevCommit initialCommit = git.commit().setMessage("initial").call();
+
+			createBranch(initialCommit, "refs/heads/side");
+			checkoutBranch("refs/heads/side");
+
+			writeTrashFile("a", "side");
+			git.add().addFilepattern("a").call();
+			RevCommit secondCommit = git.commit().setMessage("side").call();
+
+			checkoutBranch("refs/heads/master");
+
+			writeTrashFile("a", "main");
+			git.add().addFilepattern("a").call();
+			git.commit().setMessage("main").call();
+
+			MergeResult result = git.merge().include(secondCommit.getId())
+					.setStrategy(MergeStrategy.RESOLVE)
+					.setContentMergeStrategy(ContentMergeStrategy.OURS).call();
+			assertEquals(MergeStatus.MERGED, result.getMergeStatus());
+
+			assertEquals("main", read(new File(db.getWorkTree(), "a")));
+
+			assertNull(result.getConflicts());
+			assertEquals(RepositoryState.SAFE, db.getRepositoryState());
+		}
+	}
+
+	@Test
 	public void testMergeTag() throws Exception {
 		try (Git git = new Git(db)) {
 			writeTrashFile("a", "a");
@@ -790,17 +987,96 @@
 			// delete a on master to generate conflict
 			checkoutBranch("refs/heads/master");
 			git.rm().addFilepattern("a").call();
+			RevCommit thirdCommit = git.commit().setMessage("main").call();
+
+			for (ContentMergeStrategy contentStrategy : ContentMergeStrategy
+					.values()) {
+				// merge side with master
+				MergeResult result = git.merge().include(secondCommit.getId())
+						.setStrategy(MergeStrategy.RESOLVE)
+						.setContentMergeStrategy(contentStrategy)
+						.call();
+				assertEquals("merge -X " + contentStrategy.name(),
+						MergeStatus.CONFLICTING, result.getMergeStatus());
+
+				// result should be 'a' conflicting with workspace content from
+				// side
+				assertTrue("merge -X " + contentStrategy.name(),
+						new File(db.getWorkTree(), "a").exists());
+				assertEquals("merge -X " + contentStrategy.name(),
+						"1\na(side)\n3\n",
+						read(new File(db.getWorkTree(), "a")));
+				assertEquals("merge -X " + contentStrategy.name(), "1\nb\n3\n",
+						read(new File(db.getWorkTree(), "b")));
+				git.reset().setMode(ResetType.HARD).setRef(thirdCommit.name())
+						.call();
+			}
+		}
+	}
+
+	@Test
+	public void testDeletionOnMasterTheirs() throws Exception {
+		try (Git git = new Git(db)) {
+			writeTrashFile("a", "1\na\n3\n");
+			writeTrashFile("b", "1\nb\n3\n");
+			git.add().addFilepattern("a").addFilepattern("b").call();
+			RevCommit initialCommit = git.commit().setMessage("initial").call();
+
+			// create side branch and modify "a"
+			createBranch(initialCommit, "refs/heads/side");
+			checkoutBranch("refs/heads/side");
+			writeTrashFile("a", "1\na(side)\n3\n");
+			git.add().addFilepattern("a").call();
+			RevCommit secondCommit = git.commit().setMessage("side").call();
+
+			// delete a on master to generate conflict
+			checkoutBranch("refs/heads/master");
+			git.rm().addFilepattern("a").call();
 			git.commit().setMessage("main").call();
 
 			// merge side with master
 			MergeResult result = git.merge().include(secondCommit.getId())
-					.setStrategy(MergeStrategy.RESOLVE).call();
-			assertEquals(MergeStatus.CONFLICTING, result.getMergeStatus());
+					.setStrategy(MergeStrategy.THEIRS)
+					.call();
+			assertEquals(MergeStatus.MERGED, result.getMergeStatus());
 
-			// result should be 'a' conflicting with workspace content from side
+			// result should be 'a'
 			assertTrue(new File(db.getWorkTree(), "a").exists());
-			assertEquals("1\na(side)\n3\n", read(new File(db.getWorkTree(), "a")));
+			assertEquals("1\na(side)\n3\n",
+					read(new File(db.getWorkTree(), "a")));
 			assertEquals("1\nb\n3\n", read(new File(db.getWorkTree(), "b")));
+			assertTrue(git.status().call().isClean());
+		}
+	}
+
+	@Test
+	public void testDeletionOnMasterOurs() throws Exception {
+		try (Git git = new Git(db)) {
+			writeTrashFile("a", "1\na\n3\n");
+			writeTrashFile("b", "1\nb\n3\n");
+			git.add().addFilepattern("a").addFilepattern("b").call();
+			RevCommit initialCommit = git.commit().setMessage("initial").call();
+
+			// create side branch and modify "a"
+			createBranch(initialCommit, "refs/heads/side");
+			checkoutBranch("refs/heads/side");
+			writeTrashFile("a", "1\na(side)\n3\n");
+			git.add().addFilepattern("a").call();
+			RevCommit secondCommit = git.commit().setMessage("side").call();
+
+			// delete a on master to generate conflict
+			checkoutBranch("refs/heads/master");
+			git.rm().addFilepattern("a").call();
+			git.commit().setMessage("main").call();
+
+			// merge side with master
+			MergeResult result = git.merge().include(secondCommit.getId())
+					.setStrategy(MergeStrategy.OURS).call();
+			assertEquals(MergeStatus.MERGED, result.getMergeStatus());
+
+			assertFalse(new File(db.getWorkTree(), "a").exists());
+			assertEquals("1\nb\n3\n", read(new File(db.getWorkTree(), "b")));
+			assertTrue(git.status().call().isClean());
 		}
 	}
 
@@ -822,19 +1098,99 @@
 			checkoutBranch("refs/heads/master");
 			writeTrashFile("a", "1\na(main)\n3\n");
 			git.add().addFilepattern("a").call();
+			RevCommit thirdCommit = git.commit().setMessage("main").call();
+
+			for (ContentMergeStrategy contentStrategy : ContentMergeStrategy
+					.values()) {
+				// merge side with master
+				MergeResult result = git.merge().include(secondCommit.getId())
+						.setStrategy(MergeStrategy.RESOLVE)
+						.setContentMergeStrategy(contentStrategy)
+						.call();
+				assertEquals("merge -X " + contentStrategy.name(),
+						MergeStatus.CONFLICTING, result.getMergeStatus());
+
+				assertTrue("merge -X " + contentStrategy.name(),
+						new File(db.getWorkTree(), "a").exists());
+				assertEquals("merge -X " + contentStrategy.name(),
+						"1\na(main)\n3\n",
+						read(new File(db.getWorkTree(), "a")));
+				assertEquals("merge -X " + contentStrategy.name(), "1\nb\n3\n",
+						read(new File(db.getWorkTree(), "b")));
+
+				assertNotNull("merge -X " + contentStrategy.name(),
+						result.getConflicts());
+				assertEquals("merge -X " + contentStrategy.name(), 1,
+						result.getConflicts().size());
+				assertEquals("merge -X " + contentStrategy.name(), 3,
+						result.getConflicts().get("a")[0].length);
+				git.reset().setMode(ResetType.HARD).setRef(thirdCommit.name())
+						.call();
+			}
+		}
+	}
+
+	@Test
+	public void testDeletionOnSideTheirs() throws Exception {
+		try (Git git = new Git(db)) {
+			writeTrashFile("a", "1\na\n3\n");
+			writeTrashFile("b", "1\nb\n3\n");
+			git.add().addFilepattern("a").addFilepattern("b").call();
+			RevCommit initialCommit = git.commit().setMessage("initial").call();
+
+			// create side branch and delete "a"
+			createBranch(initialCommit, "refs/heads/side");
+			checkoutBranch("refs/heads/side");
+			git.rm().addFilepattern("a").call();
+			RevCommit secondCommit = git.commit().setMessage("side").call();
+
+			// update a on master to generate conflict
+			checkoutBranch("refs/heads/master");
+			writeTrashFile("a", "1\na(main)\n3\n");
+			git.add().addFilepattern("a").call();
 			git.commit().setMessage("main").call();
 
 			// merge side with master
 			MergeResult result = git.merge().include(secondCommit.getId())
-					.setStrategy(MergeStrategy.RESOLVE).call();
-			assertEquals(MergeStatus.CONFLICTING, result.getMergeStatus());
+					.setStrategy(MergeStrategy.THEIRS).call();
+			assertEquals(MergeStatus.MERGED, result.getMergeStatus());
+
+			assertFalse(new File(db.getWorkTree(), "a").exists());
+			assertEquals("1\nb\n3\n", read(new File(db.getWorkTree(), "b")));
+			assertTrue(git.status().call().isClean());
+		}
+	}
+
+	@Test
+	public void testDeletionOnSideOurs() throws Exception {
+		try (Git git = new Git(db)) {
+			writeTrashFile("a", "1\na\n3\n");
+			writeTrashFile("b", "1\nb\n3\n");
+			git.add().addFilepattern("a").addFilepattern("b").call();
+			RevCommit initialCommit = git.commit().setMessage("initial").call();
+
+			// create side branch and delete "a"
+			createBranch(initialCommit, "refs/heads/side");
+			checkoutBranch("refs/heads/side");
+			git.rm().addFilepattern("a").call();
+			RevCommit secondCommit = git.commit().setMessage("side").call();
+
+			// update a on master to generate conflict
+			checkoutBranch("refs/heads/master");
+			writeTrashFile("a", "1\na(main)\n3\n");
+			git.add().addFilepattern("a").call();
+			git.commit().setMessage("main").call();
+
+			// merge side with master
+			MergeResult result = git.merge().include(secondCommit.getId())
+					.setStrategy(MergeStrategy.OURS).call();
+			assertEquals(MergeStatus.MERGED, result.getMergeStatus());
 
 			assertTrue(new File(db.getWorkTree(), "a").exists());
-			assertEquals("1\na(main)\n3\n", read(new File(db.getWorkTree(), "a")));
+			assertEquals("1\na(main)\n3\n",
+					read(new File(db.getWorkTree(), "a")));
 			assertEquals("1\nb\n3\n", read(new File(db.getWorkTree(), "b")));
-
-			assertEquals(1, result.getConflicts().size());
-			assertEquals(3, result.getConflicts().get("a")[0].length);
+			assertTrue(git.status().call().isClean());
 		}
 	}
 
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandTest.java
index e4af44e..9af77aa 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandTest.java
@@ -34,6 +34,8 @@
 import org.eclipse.jgit.lib.Repository;
 import org.eclipse.jgit.lib.RepositoryState;
 import org.eclipse.jgit.lib.StoredConfig;
+import org.eclipse.jgit.merge.ContentMergeStrategy;
+import org.eclipse.jgit.merge.MergeStrategy;
 import org.eclipse.jgit.revwalk.RevCommit;
 import org.eclipse.jgit.revwalk.RevSort;
 import org.eclipse.jgit.revwalk.RevWalk;
@@ -154,6 +156,75 @@
 	}
 
 	@Test
+	public void testPullConflictTheirs() throws Exception {
+		PullResult res = target.pull().call();
+		// nothing to update since we don't have different data yet
+		assertTrue(res.getFetchResult().getTrackingRefUpdates().isEmpty());
+		assertTrue(res.getMergeResult().getMergeStatus()
+				.equals(MergeStatus.ALREADY_UP_TO_DATE));
+
+		assertFileContentsEqual(targetFile, "Hello world");
+
+		// change the source file
+		writeToFile(sourceFile, "Source change");
+		source.add().addFilepattern("SomeFile.txt").call();
+		source.commit().setMessage("Source change in remote").call();
+
+		// change the target file
+		writeToFile(targetFile, "Target change");
+		target.add().addFilepattern("SomeFile.txt").call();
+		target.commit().setMessage("Target change in local").call();
+
+		res = target.pull().setStrategy(MergeStrategy.THEIRS).call();
+
+		assertTrue(res.isSuccessful());
+		assertFileContentsEqual(targetFile, "Source change");
+		assertEquals(RepositoryState.SAFE,
+				target.getRepository().getRepositoryState());
+		assertTrue(target.status().call().isClean());
+	}
+
+	@Test
+	public void testPullConflictXtheirs() throws Exception {
+		PullResult res = target.pull().call();
+		// nothing to update since we don't have different data yet
+		assertTrue(res.getFetchResult().getTrackingRefUpdates().isEmpty());
+		assertTrue(res.getMergeResult().getMergeStatus()
+				.equals(MergeStatus.ALREADY_UP_TO_DATE));
+
+		assertFileContentsEqual(targetFile, "Hello world");
+
+		// change the source file
+		writeToFile(sourceFile, "a\nHello\nb\n");
+		source.add().addFilepattern("SomeFile.txt").call();
+		source.commit().setMessage("Multi-line change in remote").call();
+
+		// Pull again
+		res = target.pull().call();
+		assertTrue(res.isSuccessful());
+		assertFileContentsEqual(targetFile, "a\nHello\nb\n");
+
+		// change the source file
+		writeToFile(sourceFile, "a\nSource change\nb\n");
+		source.add().addFilepattern("SomeFile.txt").call();
+		source.commit().setMessage("Source change in remote").call();
+
+		// change the target file
+		writeToFile(targetFile, "a\nTarget change\nb\nc\n");
+		target.add().addFilepattern("SomeFile.txt").call();
+		target.commit().setMessage("Target change in local").call();
+
+		res = target.pull().setContentMergeStrategy(ContentMergeStrategy.THEIRS)
+				.call();
+
+		assertTrue(res.isSuccessful());
+		assertFileContentsEqual(targetFile, "a\nSource change\nb\nc\n");
+		assertEquals(RepositoryState.SAFE,
+				target.getRepository().getRepositoryState());
+		assertTrue(target.status().call().isClean());
+	}
+
+	@Test
 	public void testPullWithUntrackedStash() throws Exception {
 		target.pull().call();
 
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RevertCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RevertCommandTest.java
index 57c8991..cfa8486 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RevertCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RevertCommandTest.java
@@ -253,7 +253,7 @@
 	}
 
 	@Test
-	public void testRevertkConflictReset() throws Exception {
+	public void testRevertConflictReset() throws Exception {
 		try (Git git = new Git(db)) {
 			RevCommit sideCommit = prepareRevert(git);
 
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StashApplyCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StashApplyCommandTest.java
index f109cbf..49b31b1 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StashApplyCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StashApplyCommandTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012, GitHub Inc. and others
+ * Copyright (C) 2012, 2021 GitHub Inc. and others
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Distribution License v. 1.0 which is available at
@@ -28,6 +28,8 @@
 import org.eclipse.jgit.junit.RepositoryTestCase;
 import org.eclipse.jgit.lib.ObjectId;
 import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.merge.ContentMergeStrategy;
+import org.eclipse.jgit.merge.MergeStrategy;
 import org.eclipse.jgit.revwalk.RevCommit;
 import org.eclipse.jgit.util.FileUtils;
 import org.junit.After;
@@ -427,6 +429,135 @@
 	}
 
 	@Test
+	public void stashedContentMergeXtheirs() throws Exception {
+		writeTrashFile(PATH, "content\nmore content\n");
+		git.add().addFilepattern(PATH).call();
+		git.commit().setMessage("more content").call();
+
+		writeTrashFile(PATH, "content\nhead change\nmore content\n");
+		git.add().addFilepattern(PATH).call();
+		git.commit().setMessage("even content").call();
+
+		writeTrashFile(PATH, "content\nstashed change\nmore content\n");
+
+		RevCommit stashed = git.stashCreate().call();
+		assertNotNull(stashed);
+		assertEquals("content\nhead change\nmore content\n",
+				read(committedFile));
+		assertTrue(git.status().call().isClean());
+		recorder.assertEvent(new String[] { PATH }, ChangeRecorder.EMPTY);
+
+		writeTrashFile(PATH, "content\nmore content\ncommitted change\n");
+		git.add().addFilepattern(PATH).call();
+		git.commit().setMessage("committed change").call();
+		recorder.assertNoEvent();
+
+		git.stashApply().setContentMergeStrategy(ContentMergeStrategy.THEIRS)
+				.call();
+		recorder.assertEvent(new String[] { PATH }, ChangeRecorder.EMPTY);
+		Status status = new StatusCommand(db).call();
+		assertEquals('[' + PATH + ']', status.getModified().toString());
+		assertEquals(
+				"content\nstashed change\nmore content\ncommitted change\n",
+				read(PATH));
+	}
+
+	@Test
+	public void stashedContentMergeXours() throws Exception {
+		writeTrashFile(PATH, "content\nmore content\n");
+		git.add().addFilepattern(PATH).call();
+		git.commit().setMessage("more content").call();
+
+		writeTrashFile(PATH, "content\nhead change\nmore content\n");
+		git.add().addFilepattern(PATH).call();
+		git.commit().setMessage("even content").call();
+
+		writeTrashFile(PATH, "content\nstashed change\nmore content\n");
+
+		RevCommit stashed = git.stashCreate().call();
+		assertNotNull(stashed);
+		assertEquals("content\nhead change\nmore content\n",
+				read(committedFile));
+		assertTrue(git.status().call().isClean());
+		recorder.assertEvent(new String[] { PATH }, ChangeRecorder.EMPTY);
+
+		writeTrashFile(PATH,
+				"content\nnew head\nmore content\ncommitted change\n");
+		git.add().addFilepattern(PATH).call();
+		git.commit().setMessage("committed change").call();
+		recorder.assertNoEvent();
+
+		git.stashApply().setContentMergeStrategy(ContentMergeStrategy.OURS)
+				.call();
+		recorder.assertEvent(new String[] { PATH }, ChangeRecorder.EMPTY);
+		assertTrue(git.status().call().isClean());
+		assertEquals("content\nnew head\nmore content\ncommitted change\n",
+				read(PATH));
+	}
+
+	@Test
+	public void stashedContentMergeTheirs() throws Exception {
+		writeTrashFile(PATH, "content\nmore content\n");
+		git.add().addFilepattern(PATH).call();
+		git.commit().setMessage("more content").call();
+
+		writeTrashFile(PATH, "content\nhead change\nmore content\n");
+		git.add().addFilepattern(PATH).call();
+		git.commit().setMessage("even content").call();
+
+		writeTrashFile(PATH, "content\nstashed change\nmore content\n");
+
+		RevCommit stashed = git.stashCreate().call();
+		assertNotNull(stashed);
+		assertEquals("content\nhead change\nmore content\n",
+				read(committedFile));
+		assertTrue(git.status().call().isClean());
+		recorder.assertEvent(new String[] { PATH }, ChangeRecorder.EMPTY);
+
+		writeTrashFile(PATH, "content\nmore content\ncommitted change\n");
+		git.add().addFilepattern(PATH).call();
+		git.commit().setMessage("committed change").call();
+		recorder.assertNoEvent();
+
+		git.stashApply().setStrategy(MergeStrategy.THEIRS).call();
+		recorder.assertEvent(new String[] { PATH }, ChangeRecorder.EMPTY);
+		Status status = new StatusCommand(db).call();
+		assertEquals('[' + PATH + ']', status.getModified().toString());
+		assertEquals("content\nstashed change\nmore content\n", read(PATH));
+	}
+
+	@Test
+	public void stashedContentMergeOurs() throws Exception {
+		writeTrashFile(PATH, "content\nmore content\n");
+		git.add().addFilepattern(PATH).call();
+		git.commit().setMessage("more content").call();
+
+		writeTrashFile(PATH, "content\nhead change\nmore content\n");
+		git.add().addFilepattern(PATH).call();
+		git.commit().setMessage("even content").call();
+
+		writeTrashFile(PATH, "content\nstashed change\nmore content\n");
+
+		RevCommit stashed = git.stashCreate().call();
+		assertNotNull(stashed);
+		assertEquals("content\nhead change\nmore content\n",
+				read(committedFile));
+		assertTrue(git.status().call().isClean());
+		recorder.assertEvent(new String[] { PATH }, ChangeRecorder.EMPTY);
+
+		writeTrashFile(PATH, "content\nmore content\ncommitted change\n");
+		git.add().addFilepattern(PATH).call();
+		git.commit().setMessage("committed change").call();
+		recorder.assertNoEvent();
+
+		// Doesn't make any sense... should be a no-op
+		git.stashApply().setStrategy(MergeStrategy.OURS).call();
+		recorder.assertNoEvent();
+		assertTrue(git.status().call().isClean());
+		assertEquals("content\nmore content\ncommitted change\n", read(PATH));
+	}
+
+	@Test
 	public void stashedApplyOnOtherBranch() throws Exception {
 		writeTrashFile(PATH, "content\nmore content\n");
 		git.add().addFilepattern(PATH).call();
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RenameDetectorTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RenameDetectorTest.java
index 6203fed..5edb60c 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RenameDetectorTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RenameDetectorTest.java
@@ -543,6 +543,94 @@
 	}
 
 	@Test
+	public void testExactRename_LargeFile() throws Exception {
+		ObjectId aId = blob("blah\nblah\nfoo"); // size = 14
+
+		DiffEntry a = DiffEntry.add(PATH_A, aId);
+		DiffEntry b = DiffEntry.delete(PATH_Q, aId);
+
+		rd.add(a);
+		rd.add(b);
+
+		// Exact renames are identified for large files
+		rd.setBigFileThreshold(10);
+		List<DiffEntry> entries = rd.compute();
+		assertEquals(1, entries.size());
+		assertRename(b, a, 100, entries.get(0));
+	}
+
+	@Test
+	public void testInexactRename_LargeFile() throws Exception {
+		ObjectId aId = blob("blah\nblah\nfoo"); // size = 14
+		ObjectId bId = blob("bla\nblah\nfoo"); // size = 13
+
+		DiffEntry a = DiffEntry.add(PATH_A, aId);
+		DiffEntry b = DiffEntry.delete(PATH_Q, bId);
+
+		rd.add(a);
+		rd.add(b);
+
+		rd.setBigFileThreshold(10);
+
+		// Inexact renames are not detected for large files
+		List<DiffEntry> entries = rd.compute();
+		assertEquals(2, entries.size());
+		assertAdd(PATH_A, aId, FileMode.REGULAR_FILE, entries.get(0));
+		assertDelete(PATH_Q, bId, FileMode.REGULAR_FILE, entries.get(1));
+	}
+
+	@Test
+	public void testExactRenameForBinaryFile_isIdentified() throws Exception {
+		ObjectId aId = blob("a\nb\nc\n\0\0\0\0d\n");
+
+		DiffEntry a = DiffEntry.add(PATH_A, aId);
+		DiffEntry b = DiffEntry.delete(PATH_Q, aId);
+
+		rd.add(a);
+		rd.add(b);
+
+		List<DiffEntry> entries = rd.compute();
+		assertEquals(1, entries.size());
+		assertRename(b, a, 100, entries.get(0));
+	}
+
+	@Test
+	public void testInexactRenameForBinaryFile_identifiedByDefault() throws Exception {
+		ObjectId aId = blob("a\nb\nc\n\0\0\0\0d\n");
+		ObjectId bId = blob("a\nb\nc\n\0\0\0d\n");
+
+		DiffEntry a = DiffEntry.add(PATH_A, aId);
+		DiffEntry b = DiffEntry.delete(PATH_Q, bId);
+
+		rd.add(a);
+		rd.add(b);
+		rd.setRenameScore(40);
+
+		List<DiffEntry> entries = rd.compute();
+		assertEquals(1, entries.size());
+		assertRename(b, a, 50, entries.get(0));
+	}
+
+	@Test
+	public void testInexactRenameForBinaryFile_notIdentifiedIfSkipParameterSet() throws Exception {
+		ObjectId aId = blob("a\nb\nc\n\0\0\0\0d\n");
+		ObjectId bId = blob("a\nb\nc\n\0\0\0d\n");
+
+		DiffEntry a = DiffEntry.add(PATH_A, aId);
+		DiffEntry b = DiffEntry.delete(PATH_Q, bId);
+
+		rd.add(a);
+		rd.add(b);
+		rd.setRenameScore(40);
+		rd.setSkipContentRenamesForBinaryFiles(true);
+
+		List<DiffEntry> entries = rd.compute();
+		assertEquals(2, entries.size());
+		assertAdd(PATH_A, aId, FileMode.REGULAR_FILE, entries.get(0));
+		assertDelete(PATH_Q, bId, FileMode.REGULAR_FILE, entries.get(1));
+	}
+
+	@Test
 	public void testSetRenameScore_IllegalArgs() throws Exception {
 		try {
 			rd.setRenameScore(-1);
@@ -634,4 +722,15 @@
 		assertEquals(AbbreviatedObjectId.fromObjectId(newId), add.newId);
 		assertEquals(newMode, add.newMode);
 	}
+
+	private static void assertDelete(String oldName, ObjectId oldId,
+			FileMode oldMode, DiffEntry delete) {
+		assertEquals(DiffEntry.DEV_NULL, delete.newPath);
+		assertEquals(DiffEntry.A_ZERO, delete.newId);
+		assertEquals(FileMode.MISSING, delete.newMode);
+		assertEquals(ChangeType.DELETE, delete.changeType);
+		assertEquals(oldName, delete.oldPath);
+		assertEquals(AbbreviatedObjectId.fromObjectId(oldId), delete.oldId);
+		assertEquals(oldMode, delete.oldMode);
+	}
 }
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/gitrepo/RepoCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/gitrepo/RepoCommandTest.java
index ae4db0b..509adc2 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/gitrepo/RepoCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/gitrepo/RepoCommandTest.java
@@ -46,6 +46,8 @@
 import org.eclipse.jgit.storage.file.FileBasedConfig;
 import org.eclipse.jgit.treewalk.TreeWalk;
 import org.eclipse.jgit.util.FS;
+import org.eclipse.jgit.util.IO;
+import org.eclipse.jgit.util.RawParseUtils;
 import org.junit.Test;
 
 public class RepoCommandTest extends RepositoryTestCase {
@@ -749,10 +751,56 @@
 			String gitlink = localDb.resolve(Constants.HEAD + ":foo").name();
 			assertEquals("The gitlink is same as remote head",
 					oldCommitId.name(), gitlink);
+
+			File dotmodules = new File(localDb.getWorkTree(),
+					Constants.DOT_GIT_MODULES);
+			assertTrue(dotmodules.exists());
+			// The .gitmodules file should have "branch" lines
+			String gitModulesContents = RawParseUtils
+					.decode(IO.readFully(dotmodules));
+			assertTrue(gitModulesContents.contains("branch = branch"));
 		}
 	}
 
 	@Test
+	public void testRevisionBare_ignoreTags() throws Exception {
+		Repository remoteDb = createBareRepository();
+		Repository tempDb = createWorkRepository();
+
+		StringBuilder xmlContent = new StringBuilder();
+		xmlContent.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n")
+				.append("<manifest>")
+				.append("<remote name=\"remote1\" fetch=\".\" />")
+				.append("<default revision=\"").append("refs/tags/" + TAG)
+				.append("\" remote=\"remote1\" />")
+				.append("<project path=\"foo\" name=\"")
+				.append(defaultUri)
+				.append("\" />").append("</manifest>");
+		JGitTestUtil.writeTrashFile(tempDb, "manifest.xml",
+				xmlContent.toString());
+		RepoCommand command = new RepoCommand(remoteDb);
+		command.setPath(
+				tempDb.getWorkTree().getAbsolutePath() + "/manifest.xml")
+				.setURI(rootUri).call();
+		// Clone it
+		File directory = createTempDirectory("testReplaceManifestBare");
+		File dotmodules;
+		try (Repository localDb = Git.cloneRepository().setDirectory(directory)
+				.setURI(remoteDb.getDirectory().toURI().toString()).call()
+				.getRepository()) {
+			dotmodules = new File(localDb.getWorkTree(),
+					Constants.DOT_GIT_MODULES);
+			assertTrue(dotmodules.exists());
+		}
+
+		// The .gitmodules file should not have "branch" lines
+		String gitModulesContents = RawParseUtils
+				.decode(IO.readFully(dotmodules));
+		assertFalse(gitModulesContents.contains("branch"));
+		assertTrue(gitModulesContents.contains("ref = refs/tags/" + TAG));
+	}
+
+	@Test
 	public void testCopyFileBare() throws Exception {
 		Repository remoteDb = createBareRepository();
 		Repository tempDb = createWorkRepository();
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergerTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergerTest.java
index eecf25b..6cbb4a8 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergerTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergerTest.java
@@ -1648,6 +1648,82 @@
 				indexState(CONTENT));
 	}
 
+	/**
+	 * Merging two commits when files have equal content, but conflicting file mode
+	 * in the virtual ancestor.
+	 *
+	 * <p>
+	 * This test has the same set up as
+	 * {@code checkFileDirMergeConflictInVirtualAncestor_NoConflictInChildren}, only
+	 * with the mode conflict in A1 and A2.
+	 */
+	@Theory
+	public void checkModeMergeConflictInVirtualAncestor(MergeStrategy strategy) throws Exception {
+		if (!strategy.equals(MergeStrategy.RECURSIVE)) {
+			return;
+		}
+
+		Git git = Git.wrap(db);
+
+		// master
+		writeTrashFile("c", "initial file");
+		git.add().addFilepattern("c").call();
+		RevCommit commitI = git.commit().setMessage("Initial commit").call();
+
+		File a = writeTrashFile("a", "content in Ancestor");
+		git.add().addFilepattern("a").call();
+		RevCommit commitA1 = git.commit().setMessage("Ancestor 1").call();
+
+		a = writeTrashFile("a", "content in Child 1 (commited on master)");
+		git.add().addFilepattern("a").call();
+		// commit C1M
+		git.commit().setMessage("Child 1 on master").call();
+
+		git.checkout().setCreateBranch(true).setStartPoint(commitI).setName("branch-to-merge").call();
+		// "a" becomes executable in A2
+		a = writeTrashFile("a", "content in Ancestor");
+		a.setExecutable(true);
+		git.add().addFilepattern("a").call();
+		RevCommit commitA2 = git.commit().setMessage("Ancestor 2").call();
+
+		// second branch
+		git.checkout().setCreateBranch(true).setStartPoint(commitA1).setName("second-branch").call();
+		a = writeTrashFile("a", "content in Child 2 (commited on second-branch)");
+		git.add().addFilepattern("a").call();
+		// commit C2S
+		git.commit().setMessage("Child 2 on second-branch").call();
+
+		// Merge branch-to-merge into second-branch
+		MergeResult mergeResult = git.merge().include(commitA2).setStrategy(strategy).call();
+		assertEquals(mergeResult.getNewHead(), null);
+		assertEquals(mergeResult.getMergeStatus(), MergeStatus.CONFLICTING);
+		// Resolve the conflict manually, merge "a" as non-executable
+		a = writeTrashFile("a", "merge conflict resolution");
+		a.setExecutable(false);
+		git.add().addFilepattern("a").call();
+		RevCommit commitC3S = git.commit().setMessage("Child 3 on second bug - resolve merge conflict").call();
+
+		// Merge branch-to-merge into master
+		git.checkout().setName("master").call();
+		mergeResult = git.merge().include(commitA2).setStrategy(strategy).call();
+		assertEquals(mergeResult.getNewHead(), null);
+		assertEquals(mergeResult.getMergeStatus(), MergeStatus.CONFLICTING);
+
+		// Resolve the conflict manually - merge "a" as non-executable
+		a = writeTrashFile("a", "merge conflict resolution");
+		a.setExecutable(false);
+		git.add().addFilepattern("a").call();
+		// commit C4M
+		git.commit().setMessage("Child 4 on master - resolve merge conflict").call();
+
+		// Merge C4M (second-branch) into master (C3S)
+		// Conflict in virtual base should be here, but there are no conflicts in
+		// children
+		mergeResult = git.merge().include(commitC3S).call();
+		assertEquals(mergeResult.getMergeStatus(), MergeStatus.MERGED);
+
+	}
+
 	private void writeSubmodule(String path, ObjectId commit)
 			throws IOException, ConfigInvalidException {
 		addSubmoduleToIndex(path, commit);
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkMergedIntoTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkMergedIntoTest.java
index 2c21eb6..2f16aa4 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkMergedIntoTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkMergedIntoTest.java
@@ -11,6 +11,9 @@
 
 import static org.junit.Assert.assertTrue;
 
+import java.util.List;
+import java.util.stream.Collectors;
+import org.eclipse.jgit.lib.Ref;
 import org.junit.Test;
 
 public class RevWalkMergedIntoTest extends RevWalkTestCase {
@@ -44,4 +47,82 @@
 		final RevCommit t = commit(n, o);
 		assertTrue(rw.isMergedInto(b, t));
 	}
+
+	@Test
+	public void testGetMergedInto() throws Exception {
+		/*
+		 *          i
+		 *         / \
+		 *        A   o
+		 *       / \   \
+		 *      o1  o2  E
+		 *     / \ / \
+		 *    B   C   D
+		 */
+		String b = "refs/heads/b";
+		String c = "refs/heads/c";
+		String d = "refs/heads/d";
+		String e = "refs/heads/e";
+		final RevCommit i = commit();
+		final RevCommit a = commit(i);
+		final RevCommit o1 = commit(a);
+		final RevCommit o2 = commit(a);
+		createBranch(commit(o1), b);
+		createBranch(commit(o1, o2), c);
+		createBranch(commit(o2), d);
+		createBranch(commit(commit(i)), e);
+
+		List<String>  modifiedResult = rw.getMergedInto(a, getRefs())
+				.stream().map(Ref::getName).collect(Collectors.toList());
+
+		assertTrue(modifiedResult.size() == 3);
+		assertTrue(modifiedResult.contains(b));
+		assertTrue(modifiedResult.contains(c));
+		assertTrue(modifiedResult.contains(d));
+	}
+
+	@Test
+	public void testIsMergedIntoAny() throws Exception {
+		/*
+		 *          i
+		 *         / \
+		 *        A   o
+		 *       /     \
+		 *      o       C
+		 *     /
+		 *    B
+		 */
+		String b = "refs/heads/b";
+		String c = "refs/heads/c";
+		final RevCommit i = commit();
+		final RevCommit a = commit(i);
+		createBranch(commit(commit(a)), b);
+		createBranch(commit(commit(i)), c);
+
+		assertTrue( rw.isMergedIntoAny(a, getRefs()));
+	}
+
+	@Test
+	public void testIsMergedIntoAll() throws Exception {
+		/*
+		 *
+		 *        A
+		 *       / \
+		 *      o1  o2
+		 *     / \ / \
+		 *    B   C   D
+		 */
+
+		String b = "refs/heads/b";
+		String c = "refs/heads/c";
+		String d = "refs/heads/c";
+		final RevCommit a = commit();
+		final RevCommit o1 = commit(a);
+		final RevCommit o2 = commit(a);
+		createBranch(commit(o1), b);
+		createBranch(commit(o1, o2), c);
+		createBranch(commit(o2), d);
+
+		assertTrue(rw.isMergedIntoAll(a, getRefs()));
+	}
 }
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/Base85Test.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/Base85Test.java
new file mode 100644
index 0000000..a49878c
--- /dev/null
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/Base85Test.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2021 Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.util;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThrows;
+import static org.junit.Assert.assertTrue;
+
+import java.nio.charset.StandardCharsets;
+
+import org.junit.Test;
+
+/**
+ * Tests for {@link Base85}.
+ */
+public class Base85Test {
+
+	private static final String VALID_CHARS = "0123456789"
+			+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
+			+ "!#$%&()*+-;<=>?@^_`{|}~";
+
+	@Test
+	public void testChars() {
+		for (int i = 0; i < 256; i++) {
+			byte[] testData = { '1', '2', '3', '4', (byte) i };
+			if (VALID_CHARS.indexOf(i) >= 0) {
+				byte[] decoded = Base85.decode(testData, 4);
+				assertNotNull(decoded);
+			} else {
+				assertThrows(IllegalArgumentException.class,
+						() -> Base85.decode(testData, 4));
+			}
+		}
+	}
+
+	private void roundtrip(byte[] data, int expectedLength) {
+		byte[] encoded = Base85.encode(data);
+		assertEquals(expectedLength, encoded.length);
+		assertArrayEquals(data, Base85.decode(encoded, data.length));
+	}
+
+	private void roundtrip(String data, int expectedLength) {
+		roundtrip(data.getBytes(StandardCharsets.US_ASCII), expectedLength);
+	}
+
+	@Test
+	public void testPadding() {
+		roundtrip("", 0);
+		roundtrip("a", 5);
+		roundtrip("ab", 5);
+		roundtrip("abc", 5);
+		roundtrip("abcd", 5);
+		roundtrip("abcde", 10);
+		roundtrip("abcdef", 10);
+		roundtrip("abcdefg", 10);
+		roundtrip("abcdefgh", 10);
+		roundtrip("abcdefghi", 15);
+	}
+
+	@Test
+	public void testBinary() {
+		roundtrip(new byte[] { 1 }, 5);
+		roundtrip(new byte[] { 1, 2 }, 5);
+		roundtrip(new byte[] { 1, 2, 3 }, 5);
+		roundtrip(new byte[] { 1, 2, 3, 4 }, 5);
+		roundtrip(new byte[] { 1, 2, 3, 4, 5 }, 10);
+		roundtrip(new byte[] { 1, 2, 3, 4, 5, 0, 0, 0 }, 10);
+		roundtrip(new byte[] { 1, 2, 3, 4, 0, 0, 0, 5 }, 10);
+	}
+
+	@Test
+	public void testOverflow() {
+		IllegalArgumentException e = assertThrows(
+				IllegalArgumentException.class,
+				() -> Base85.decode(new byte[] { '~', '~', '~', '~', '~' }, 4));
+		assertTrue(e.getMessage().contains("overflow"));
+	}
+}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/io/BinaryDeltaInputStreamTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/io/BinaryDeltaInputStreamTest.java
new file mode 100644
index 0000000..d9297fc
--- /dev/null
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/io/BinaryDeltaInputStreamTest.java
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2021 Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.util.io;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.util.zip.InflaterInputStream;
+
+import org.junit.Test;
+
+/**
+ * Crude tests for the {@link BinaryDeltaInputStream} using delta diffs
+ * generated by C git.
+ */
+public class BinaryDeltaInputStreamTest {
+
+	private InputStream getBinaryHunk(String name) {
+		return this.getClass().getResourceAsStream(name);
+	}
+
+	@Test
+	public void testBinaryDelta() throws Exception {
+		// Prepare our test data
+		byte[] data = new byte[8192];
+		for (int i = 0; i < data.length; i++) {
+			data[i] = (byte) (255 - (i % 256));
+		}
+		// Same, but with five 'x' inserted in the middle.
+		int middle = data.length / 2;
+		byte[] newData = new byte[data.length + 5];
+		System.arraycopy(data, 0, newData, 0, middle);
+		for (int i = 0; i < 5; i++) {
+			newData[middle + i] = 'x';
+		}
+		System.arraycopy(data, middle, newData, middle + 5, middle);
+		// delta1.forward has the instructions
+		// @formatter:off
+		// COPY 0 4096
+		// INSERT 5 xxxxx
+		// COPY 0 4096
+		// @formatter:on
+		// Note that the way we built newData could be expressed as
+		// @formatter:off
+		// COPY 0 4096
+		// INSERT 5 xxxxx
+		// COPY 4096 4096
+		// @formatter:on
+		try (ByteArrayOutputStream out = new ByteArrayOutputStream();
+				BinaryDeltaInputStream input = new BinaryDeltaInputStream(data,
+						new InflaterInputStream(new BinaryHunkInputStream(
+								getBinaryHunk("delta1.forward"))))) {
+			byte[] buf = new byte[1024];
+			int n;
+			while ((n = input.read(buf)) >= 0) {
+				out.write(buf, 0, n);
+			}
+			assertArrayEquals(newData, out.toByteArray());
+			assertTrue(input.isFullyConsumed());
+		}
+		// delta1.reverse has the instructions
+		// @formatter:off
+		// COPY 0 4096
+		// COPY 256 3840
+		// COPY 256 256
+		// @formatter:on
+		// Note that there are alternatives, for instance
+		// @formatter:off
+		// COPY 0 4096
+		// COPY 4101 4096
+		// @formatter:on
+		// or
+		// @formatter:off
+		// COPY 0 4096
+		// COPY 0 4096
+		// @formatter:on
+		try (ByteArrayOutputStream out = new ByteArrayOutputStream();
+				BinaryDeltaInputStream input = new BinaryDeltaInputStream(
+						newData,
+						new InflaterInputStream(new BinaryHunkInputStream(
+								getBinaryHunk("delta1.reverse"))))) {
+			long expectedSize = input.getExpectedResultSize();
+			assertEquals(data.length, expectedSize);
+			byte[] buf = new byte[1024];
+			int n;
+			while ((n = input.read(buf)) >= 0) {
+				out.write(buf, 0, n);
+			}
+			assertArrayEquals(data, out.toByteArray());
+			assertTrue(input.isFullyConsumed());
+		}
+	}
+}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/io/BinaryHunkStreamTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/io/BinaryHunkStreamTest.java
new file mode 100644
index 0000000..b198c32
--- /dev/null
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/io/BinaryHunkStreamTest.java
@@ -0,0 +1,146 @@
+/*
+ * Copyright (C) 2021 Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.util.io;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.Arrays;
+
+import org.junit.Test;
+
+/**
+ * Tests for {@link BinaryHunkInputStream} and {@link BinaryHunkOutputStream}.
+ */
+public class BinaryHunkStreamTest {
+
+	@Test
+	public void testRoundtripWholeBuffer() throws IOException {
+		for (int length = 1; length < 520 + 52; length++) {
+			byte[] data = new byte[length];
+			for (int i = 0; i < data.length; i++) {
+				data[i] = (byte) (255 - (i % 256));
+			}
+			try (ByteArrayOutputStream bos = new ByteArrayOutputStream();
+					BinaryHunkOutputStream out = new BinaryHunkOutputStream(
+							bos)) {
+				out.write(data);
+				out.flush();
+				byte[] encoded = bos.toByteArray();
+				assertFalse(Arrays.equals(data, encoded));
+				try (BinaryHunkInputStream in = new BinaryHunkInputStream(
+						new ByteArrayInputStream(encoded))) {
+					byte[] decoded = new byte[data.length];
+					int newLength = in.read(decoded);
+					assertEquals(newLength, decoded.length);
+					assertEquals(-1, in.read());
+					assertArrayEquals(data, decoded);
+				}
+			}
+		}
+	}
+
+	@Test
+	public void testRoundtripChunks() throws IOException {
+		for (int length = 1; length < 520 + 52; length++) {
+			byte[] data = new byte[length];
+			for (int i = 0; i < data.length; i++) {
+				data[i] = (byte) (255 - (i % 256));
+			}
+			try (ByteArrayOutputStream bos = new ByteArrayOutputStream();
+					BinaryHunkOutputStream out = new BinaryHunkOutputStream(
+							bos)) {
+				out.write(data, 0, data.length / 2);
+				out.write(data, data.length / 2, data.length - data.length / 2);
+				out.flush();
+				byte[] encoded = bos.toByteArray();
+				assertFalse(Arrays.equals(data, encoded));
+				try (BinaryHunkInputStream in = new BinaryHunkInputStream(
+						new ByteArrayInputStream(encoded))) {
+					byte[] decoded = new byte[data.length];
+					int p = 0;
+					int n;
+					while ((n = in.read(decoded, p,
+							Math.min(decoded.length - p, 57))) >= 0) {
+						p += n;
+						if (p == decoded.length) {
+							break;
+						}
+					}
+					assertEquals(p, decoded.length);
+					assertEquals(-1, in.read());
+					assertArrayEquals(data, decoded);
+				}
+			}
+		}
+	}
+
+	@Test
+	public void testRoundtripBytes() throws IOException {
+		for (int length = 1; length < 520 + 52; length++) {
+			byte[] data = new byte[length];
+			for (int i = 0; i < data.length; i++) {
+				data[i] = (byte) (255 - (i % 256));
+			}
+			try (ByteArrayOutputStream bos = new ByteArrayOutputStream();
+					BinaryHunkOutputStream out = new BinaryHunkOutputStream(
+							bos)) {
+				for (int i = 0; i < data.length; i++) {
+					out.write(data[i]);
+				}
+				out.flush();
+				byte[] encoded = bos.toByteArray();
+				assertFalse(Arrays.equals(data, encoded));
+				try (BinaryHunkInputStream in = new BinaryHunkInputStream(
+						new ByteArrayInputStream(encoded))) {
+					byte[] decoded = new byte[data.length];
+					for (int i = 0; i < decoded.length; i++) {
+						int val = in.read();
+						assertTrue(0 <= val && val <= 255);
+						decoded[i] = (byte) val;
+					}
+					assertEquals(-1, in.read());
+					assertArrayEquals(data, decoded);
+				}
+			}
+		}
+	}
+
+	@Test
+	public void testRoundtripWithClose() throws IOException {
+		for (int length = 1; length < 520 + 52; length++) {
+			byte[] data = new byte[length];
+			for (int i = 0; i < data.length; i++) {
+				data[i] = (byte) (255 - (i % 256));
+			}
+			try (ByteArrayOutputStream bos = new ByteArrayOutputStream()) {
+				try (BinaryHunkOutputStream out = new BinaryHunkOutputStream(
+						bos)) {
+					out.write(data);
+				}
+				byte[] encoded = bos.toByteArray();
+				assertFalse(Arrays.equals(data, encoded));
+				try (BinaryHunkInputStream in = new BinaryHunkInputStream(
+						new ByteArrayInputStream(encoded))) {
+					byte[] decoded = new byte[data.length];
+					int newLength = in.read(decoded);
+					assertEquals(newLength, decoded.length);
+					assertEquals(-1, in.read());
+					assertArrayEquals(data, decoded);
+				}
+			}
+		}
+	}
+}
diff --git a/org.eclipse.jgit.ui/META-INF/MANIFEST.MF b/org.eclipse.jgit.ui/META-INF/MANIFEST.MF
index 89c1102..8588995 100644
--- a/org.eclipse.jgit.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ui/META-INF/MANIFEST.MF
@@ -4,14 +4,14 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.ui
 Bundle-SymbolicName: org.eclipse.jgit.ui
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
 Bundle-Vendor: %Bundle-Vendor
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Export-Package: org.eclipse.jgit.awtui;version="5.11.2"
-Import-Package: org.eclipse.jgit.errors;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.lib;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.nls;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.revplot;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.revwalk;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.transport;version="[5.11.2,5.12.0)",
- org.eclipse.jgit.util;version="[5.11.2,5.12.0)"
+Export-Package: org.eclipse.jgit.awtui;version="5.12.1"
+Import-Package: org.eclipse.jgit.errors;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.lib;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.nls;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.revplot;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.revwalk;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.transport;version="[5.12.1,5.13.0)",
+ org.eclipse.jgit.util;version="[5.12.1,5.13.0)"
diff --git a/org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF
index 95ea630..009ecdc 100644
--- a/org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@
 Bundle-Name: org.eclipse.jgit.ui - Sources
 Bundle-SymbolicName: org.eclipse.jgit.ui.source
 Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.11.2.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.ui;version="5.11.2.qualifier";roots="."
+Bundle-Version: 5.12.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.ui;version="5.12.1.qualifier";roots="."
diff --git a/org.eclipse.jgit.ui/pom.xml b/org.eclipse.jgit.ui/pom.xml
index 2bbccf1..7ff29f92 100644
--- a/org.eclipse.jgit.ui/pom.xml
+++ b/org.eclipse.jgit.ui/pom.xml
@@ -19,7 +19,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.ui</artifactId>
diff --git a/org.eclipse.jgit/.settings/.api_filters b/org.eclipse.jgit/.settings/.api_filters
index d389ac5..33331fb 100644
--- a/org.eclipse.jgit/.settings/.api_filters
+++ b/org.eclipse.jgit/.settings/.api_filters
@@ -1,56 +1,10 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <component id="org.eclipse.jgit" version="2">
-    <resource path="src/org/eclipse/jgit/lib/ConfigConstants.java" type="org.eclipse.jgit.lib.ConfigConstants">
-        <filter id="338755678">
+    <resource path="src/org/eclipse/jgit/transport/SshConstants.java" type="org.eclipse.jgit.transport.SshConstants">
+        <filter id="1142947843">
             <message_arguments>
-                <message_argument value="org.eclipse.jgit.lib.ConfigConstants"/>
-                <message_argument value="CONFIG_REFSTORAGE_REFTREE"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/jgit/revwalk/ObjectWalk.java" type="org.eclipse.jgit.revwalk.ObjectWalk">
-        <filter id="421654647">
-            <message_arguments>
-                <message_argument value="org.eclipse.jgit.revwalk.ObjectWalk"/>
-                <message_argument value="createObjectReachabilityChecker()"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/jgit/revwalk/RevWalk.java" type="org.eclipse.jgit.revwalk.RevWalk">
-        <filter id="421654647">
-            <message_arguments>
-                <message_argument value="org.eclipse.jgit.revwalk.RevWalk"/>
-                <message_argument value="createReachabilityChecker()"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/jgit/util/FS.java" type="org.eclipse.jgit.util.FS">
-        <filter id="338792546">
-            <message_arguments>
-                <message_argument value="org.eclipse.jgit.util.FS"/>
-                <message_argument value="internalRunHookIfPresent(Repository, String, String[], PrintStream, PrintStream, String)"/>
-            </message_arguments>
-        </filter>
-        <filter id="338792546">
-            <message_arguments>
-                <message_argument value="org.eclipse.jgit.util.FS"/>
-                <message_argument value="runHookIfPresent(Repository, String, String[], PrintStream, PrintStream, String)"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/jgit/util/FS_POSIX.java" type="org.eclipse.jgit.util.FS_POSIX">
-        <filter id="338792546">
-            <message_arguments>
-                <message_argument value="org.eclipse.jgit.util.FS_POSIX"/>
-                <message_argument value="runHookIfPresent(Repository, String, String[], PrintStream, PrintStream, String)"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/jgit/util/FS_Win32_Cygwin.java" type="org.eclipse.jgit.util.FS_Win32_Cygwin">
-        <filter id="338792546">
-            <message_arguments>
-                <message_argument value="org.eclipse.jgit.util.FS_Win32_Cygwin"/>
-                <message_argument value="runHookIfPresent(Repository, String, String[], PrintStream, PrintStream, String)"/>
+                <message_argument value="5.11.1"/>
+                <message_argument value="PUBKEY_ACCEPTED_ALGORITHMS"/>
             </message_arguments>
         </filter>
     </resource>
diff --git a/org.eclipse.jgit/META-INF/MANIFEST.MF b/org.eclipse.jgit/META-INF/MANIFEST.MF
index 9bcca38..9a5793a 100644
--- a/org.eclipse.jgit/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit/META-INF/MANIFEST.MF
@@ -3,12 +3,12 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit
 Bundle-SymbolicName: org.eclipse.jgit
-Bundle-Version: 5.11.2.qualifier
+Bundle-Version: 5.12.1.qualifier
 Bundle-Localization: plugin
 Bundle-Vendor: %Bundle-Vendor
 Eclipse-ExtensibleAPI: true
-Export-Package: org.eclipse.jgit.annotations;version="5.11.2",
- org.eclipse.jgit.api;version="5.11.2";
+Export-Package: org.eclipse.jgit.annotations;version="5.12.1",
+ org.eclipse.jgit.api;version="5.12.1";
   uses:="org.eclipse.jgit.transport,
    org.eclipse.jgit.notes,
    org.eclipse.jgit.dircache,
@@ -23,18 +23,18 @@
    org.eclipse.jgit.revwalk.filter,
    org.eclipse.jgit.blame,
    org.eclipse.jgit.merge",
- org.eclipse.jgit.api.errors;version="5.11.2";
+ org.eclipse.jgit.api.errors;version="5.12.1";
   uses:="org.eclipse.jgit.lib,
    org.eclipse.jgit.errors",
- org.eclipse.jgit.attributes;version="5.11.2";
+ org.eclipse.jgit.attributes;version="5.12.1";
   uses:="org.eclipse.jgit.lib,
    org.eclipse.jgit.treewalk",
- org.eclipse.jgit.blame;version="5.11.2";
+ org.eclipse.jgit.blame;version="5.12.1";
   uses:="org.eclipse.jgit.lib,
    org.eclipse.jgit.revwalk,
    org.eclipse.jgit.treewalk.filter,
    org.eclipse.jgit.diff",
- org.eclipse.jgit.diff;version="5.11.2";
+ org.eclipse.jgit.diff;version="5.12.1";
   uses:="org.eclipse.jgit.lib,
    org.eclipse.jgit.attributes,
    org.eclipse.jgit.revwalk,
@@ -42,44 +42,44 @@
    org.eclipse.jgit.treewalk.filter,
    org.eclipse.jgit.treewalk,
    org.eclipse.jgit.util",
- org.eclipse.jgit.dircache;version="5.11.2";
+ org.eclipse.jgit.dircache;version="5.12.1";
   uses:="org.eclipse.jgit.events,
    org.eclipse.jgit.lib,
    org.eclipse.jgit.attributes,
    org.eclipse.jgit.treewalk,
    org.eclipse.jgit.util",
- org.eclipse.jgit.errors;version="5.11.2";
+ org.eclipse.jgit.errors;version="5.12.1";
   uses:="org.eclipse.jgit.transport,
    org.eclipse.jgit.dircache,
    org.eclipse.jgit.lib,
    org.eclipse.jgit.internal.storage.pack",
- org.eclipse.jgit.events;version="5.11.2";
+ org.eclipse.jgit.events;version="5.12.1";
   uses:="org.eclipse.jgit.lib",
- org.eclipse.jgit.fnmatch;version="5.11.2",
- org.eclipse.jgit.gitrepo;version="5.11.2";
+ org.eclipse.jgit.fnmatch;version="5.12.1",
+ org.eclipse.jgit.gitrepo;version="5.12.1";
   uses:="org.xml.sax.helpers,
    org.eclipse.jgit.api,
    org.eclipse.jgit.lib,
    org.eclipse.jgit.revwalk,
    org.xml.sax",
- org.eclipse.jgit.gitrepo.internal;version="5.11.2";x-internal:=true,
- org.eclipse.jgit.hooks;version="5.11.2";uses:="org.eclipse.jgit.lib",
- org.eclipse.jgit.ignore;version="5.11.2",
- org.eclipse.jgit.ignore.internal;version="5.11.2";
+ org.eclipse.jgit.gitrepo.internal;version="5.12.1";x-internal:=true,
+ org.eclipse.jgit.hooks;version="5.12.1";uses:="org.eclipse.jgit.lib",
+ org.eclipse.jgit.ignore;version="5.12.1",
+ org.eclipse.jgit.ignore.internal;version="5.12.1";
   x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.internal;version="5.11.2";
+ org.eclipse.jgit.internal;version="5.12.1";
   x-friends:="org.eclipse.jgit.test,
    org.eclipse.jgit.http.test",
- org.eclipse.jgit.internal.fsck;version="5.11.2";
+ org.eclipse.jgit.internal.fsck;version="5.12.1";
   x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.internal.revwalk;version="5.11.2";
+ org.eclipse.jgit.internal.revwalk;version="5.12.1";
   x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.internal.storage.dfs;version="5.11.2";
+ org.eclipse.jgit.internal.storage.dfs;version="5.12.1";
   x-friends:="org.eclipse.jgit.test,
    org.eclipse.jgit.http.server,
    org.eclipse.jgit.http.test,
    org.eclipse.jgit.lfs.test",
- org.eclipse.jgit.internal.storage.file;version="5.11.2";
+ org.eclipse.jgit.internal.storage.file;version="5.12.1";
   x-friends:="org.eclipse.jgit.test,
    org.eclipse.jgit.junit,
    org.eclipse.jgit.junit.http,
@@ -88,31 +88,31 @@
    org.eclipse.jgit.pgm,
    org.eclipse.jgit.pgm.test,
    org.eclipse.jgit.ssh.apache",
- org.eclipse.jgit.internal.storage.io;version="5.11.2";
+ org.eclipse.jgit.internal.storage.io;version="5.12.1";
   x-friends:="org.eclipse.jgit.junit,
    org.eclipse.jgit.test,
    org.eclipse.jgit.pgm",
- org.eclipse.jgit.internal.storage.pack;version="5.11.2";
+ org.eclipse.jgit.internal.storage.pack;version="5.12.1";
   x-friends:="org.eclipse.jgit.junit,
    org.eclipse.jgit.test,
    org.eclipse.jgit.pgm",
- org.eclipse.jgit.internal.storage.reftable;version="5.11.2";
+ org.eclipse.jgit.internal.storage.reftable;version="5.12.1";
   x-friends:="org.eclipse.jgit.http.test,
    org.eclipse.jgit.junit,
    org.eclipse.jgit.test,
    org.eclipse.jgit.pgm",
- org.eclipse.jgit.internal.submodule;version="5.11.2";x-internal:=true,
- org.eclipse.jgit.internal.transport.connectivity;version="5.11.2";
+ org.eclipse.jgit.internal.submodule;version="5.12.1";x-internal:=true,
+ org.eclipse.jgit.internal.transport.connectivity;version="5.12.1";
   x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.internal.transport.http;version="5.11.2";
+ org.eclipse.jgit.internal.transport.http;version="5.12.1";
   x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.internal.transport.parser;version="5.11.2";
+ org.eclipse.jgit.internal.transport.parser;version="5.12.1";
   x-friends:="org.eclipse.jgit.http.server,
    org.eclipse.jgit.test",
- org.eclipse.jgit.internal.transport.ssh;version="5.11.2";
+ org.eclipse.jgit.internal.transport.ssh;version="5.12.1";
   x-friends:="org.eclipse.jgit.ssh.apache,
    org.eclipse.jgit.ssh.jsch",
- org.eclipse.jgit.lib;version="5.11.2";
+ org.eclipse.jgit.lib;version="5.12.1";
   uses:="org.eclipse.jgit.transport,
    org.eclipse.jgit.util.sha1,
    org.eclipse.jgit.dircache,
@@ -126,10 +126,10 @@
    org.eclipse.jgit.util,
    org.eclipse.jgit.submodule,
    org.eclipse.jgit.util.time",
- org.eclipse.jgit.lib.internal;version="5.11.2";
+ org.eclipse.jgit.lib.internal;version="5.12.1";
   x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.logging;version="5.11.2",
- org.eclipse.jgit.merge;version="5.11.2";
+ org.eclipse.jgit.logging;version="5.12.1",
+ org.eclipse.jgit.merge;version="5.12.1";
   uses:="org.eclipse.jgit.dircache,
    org.eclipse.jgit.lib,
    org.eclipse.jgit.revwalk,
@@ -138,40 +138,40 @@
    org.eclipse.jgit.util,
    org.eclipse.jgit.api,
    org.eclipse.jgit.attributes",
- org.eclipse.jgit.nls;version="5.11.2",
- org.eclipse.jgit.notes;version="5.11.2";
+ org.eclipse.jgit.nls;version="5.12.1",
+ org.eclipse.jgit.notes;version="5.12.1";
   uses:="org.eclipse.jgit.lib,
    org.eclipse.jgit.revwalk,
    org.eclipse.jgit.treewalk,
    org.eclipse.jgit.merge",
- org.eclipse.jgit.patch;version="5.11.2";
+ org.eclipse.jgit.patch;version="5.12.1";
   uses:="org.eclipse.jgit.lib,
    org.eclipse.jgit.diff",
- org.eclipse.jgit.revplot;version="5.11.2";
+ org.eclipse.jgit.revplot;version="5.12.1";
   uses:="org.eclipse.jgit.lib,
    org.eclipse.jgit.revwalk",
- org.eclipse.jgit.revwalk;version="5.11.2";
+ org.eclipse.jgit.revwalk;version="5.12.1";
   uses:="org.eclipse.jgit.lib,
    org.eclipse.jgit.diff,
    org.eclipse.jgit.treewalk.filter,
    org.eclipse.jgit.revwalk.filter,
    org.eclipse.jgit.treewalk",
- org.eclipse.jgit.revwalk.filter;version="5.11.2";
+ org.eclipse.jgit.revwalk.filter;version="5.12.1";
   uses:="org.eclipse.jgit.revwalk,
    org.eclipse.jgit.lib,
    org.eclipse.jgit.util",
- org.eclipse.jgit.storage.file;version="5.11.2";
+ org.eclipse.jgit.storage.file;version="5.12.1";
   uses:="org.eclipse.jgit.lib,
    org.eclipse.jgit.util",
- org.eclipse.jgit.storage.pack;version="5.11.2";
+ org.eclipse.jgit.storage.pack;version="5.12.1";
   uses:="org.eclipse.jgit.lib",
- org.eclipse.jgit.submodule;version="5.11.2";
+ org.eclipse.jgit.submodule;version="5.12.1";
   uses:="org.eclipse.jgit.lib,
    org.eclipse.jgit.diff,
    org.eclipse.jgit.treewalk.filter,
    org.eclipse.jgit.treewalk,
    org.eclipse.jgit.util",
- org.eclipse.jgit.transport;version="5.11.2";
+ org.eclipse.jgit.transport;version="5.12.1";
   uses:="javax.crypto,
    org.eclipse.jgit.util.io,
    org.eclipse.jgit.lib,
@@ -184,21 +184,21 @@
    org.eclipse.jgit.transport.resolver,
    org.eclipse.jgit.storage.pack,
    org.eclipse.jgit.errors",
- org.eclipse.jgit.transport.http;version="5.11.2";
+ org.eclipse.jgit.transport.http;version="5.12.1";
   uses:="javax.net.ssl",
- org.eclipse.jgit.transport.resolver;version="5.11.2";
+ org.eclipse.jgit.transport.resolver;version="5.12.1";
   uses:="org.eclipse.jgit.transport,
    org.eclipse.jgit.lib",
- org.eclipse.jgit.treewalk;version="5.11.2";
+ org.eclipse.jgit.treewalk;version="5.12.1";
   uses:="org.eclipse.jgit.dircache,
    org.eclipse.jgit.lib,
    org.eclipse.jgit.attributes,
    org.eclipse.jgit.revwalk,
    org.eclipse.jgit.treewalk.filter,
    org.eclipse.jgit.util",
- org.eclipse.jgit.treewalk.filter;version="5.11.2";
+ org.eclipse.jgit.treewalk.filter;version="5.12.1";
   uses:="org.eclipse.jgit.treewalk",
- org.eclipse.jgit.util;version="5.11.2";
+ org.eclipse.jgit.util;version="5.12.1";
   uses:="org.eclipse.jgit.transport,
    org.eclipse.jgit.hooks,
    org.eclipse.jgit.revwalk,
@@ -211,12 +211,12 @@
    org.eclipse.jgit.treewalk,
    javax.net.ssl,
    org.eclipse.jgit.util.time",
- org.eclipse.jgit.util.io;version="5.11.2";
+ org.eclipse.jgit.util.io;version="5.12.1";
   uses:="org.eclipse.jgit.attributes,
    org.eclipse.jgit.lib,
    org.eclipse.jgit.treewalk",
- org.eclipse.jgit.util.sha1;version="5.11.2",
- org.eclipse.jgit.util.time;version="5.11.2"
+ org.eclipse.jgit.util.sha1;version="5.12.1",
+ org.eclipse.jgit.util.time;version="5.12.1"
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)",
  javax.crypto,
diff --git a/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF
index 7764fe1..03ddbb7 100644
--- a/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@
 Bundle-Name: org.eclipse.jgit - Sources
 Bundle-SymbolicName: org.eclipse.jgit.source
 Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 5.11.2.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit;version="5.11.2.qualifier";roots="."
+Bundle-Version: 5.12.1.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit;version="5.12.1.qualifier";roots="."
diff --git a/org.eclipse.jgit/pom.xml b/org.eclipse.jgit/pom.xml
index 6a52c27..c9fc127 100644
--- a/org.eclipse.jgit/pom.xml
+++ b/org.eclipse.jgit/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>5.11.2-SNAPSHOT</version>
+    <version>5.12.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit</artifactId>
diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
index b6b10ea..6180737 100644
--- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
+++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
@@ -13,6 +13,9 @@
 aNewObjectIdIsRequired=A NewObjectId is required.
 anExceptionOccurredWhileTryingToAddTheIdOfHEAD=An exception occurred while trying to add the Id of HEAD
 anSSHSessionHasBeenAlreadyCreated=An SSH session has been already created
+applyBinaryBaseOidWrong=Cannot apply binary patch; OID for file {0} does not match
+applyBinaryOidTooShort=Binary patch for file {0} does not have full IDs
+applyBinaryResultOidWrong=Result of binary patch for file {0} has wrong OID.
 applyingCommit=Applying {0}
 archiveFormatAlreadyAbsent=Archive format already absent: {0}
 archiveFormatAlreadyRegistered=Archive format already registered with different implementation: {0}
@@ -37,7 +40,19 @@
 badSectionEntry=Bad section entry: {0}
 badShallowLine=Bad shallow line: {0}
 bareRepositoryNoWorkdirAndIndex=Bare Repository has neither a working tree, nor an index
+base85invalidChar=Invalid base-85 character: 0x{0}
+base85length=Base-85 encoded data must have a length that is a multiple of 5
+base85overflow=Base-85 value overflow, does not fit into 32 bits: 0x{0}
+base85tooLong=Extra base-85 encoded data for output size of {0} bytes
+base85tooShort=Base-85 data decoded into less than {0} bytes
 baseLengthIncorrect=base length incorrect
+binaryDeltaBaseLengthMismatch=Binary delta base length does not match, expected {0}, got {1}
+binaryDeltaInvalidOffset=Binary delta offset + length too large: {0} + {1}
+binaryDeltaInvalidResultLength=Binary delta expected result length is negative
+binaryHunkDecodeError=Binary hunk, line {0}: invalid input
+binaryHunkInvalidLength=Binary hunk, line {0}: input corrupt; expected length byte, got 0x{1}
+binaryHunkLineTooShort=Binary hunk, line {0}: input ended prematurely
+binaryHunkMissingNewline=Binary hunk, line {0}: input line not terminated by newline
 bitmapMissingObject=Bitmap at {0} is missing {1}.
 bitmapsMustBePrepared=Bitmaps must be prepared before they may be written.
 blameNotCommittedYet=Not Committed Yet
@@ -139,6 +154,7 @@
 connectionFailed=connection failed
 connectionTimeOut=Connection time out: {0}
 contextMustBeNonNegative=context must be >= 0
+cookieFilePathRelative=git config http.cookieFile contains a relative path, should be absolute: {0}
 corruptionDetectedReReadingAt=Corruption detected re-reading at {0}
 corruptObjectBadDate=bad date
 corruptObjectBadEmail=bad email
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java
index e228e82..583767a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011, 2020 IBM Corporation and others
+ * Copyright (C) 2011, 2021 IBM Corporation and others
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Distribution License v. 1.0 which is available at
@@ -9,29 +9,68 @@
  */
 package org.eclipse.jgit.api;
 
+import java.io.BufferedInputStream;
+import java.io.ByteArrayInputStream;
 import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.Writer;
+import java.io.OutputStream;
+import java.nio.ByteBuffer;
 import java.nio.file.Files;
 import java.nio.file.StandardCopyOption;
 import java.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
+import java.util.zip.InflaterInputStream;
 
+import org.eclipse.jgit.api.errors.FilterFailedException;
 import org.eclipse.jgit.api.errors.GitAPIException;
 import org.eclipse.jgit.api.errors.PatchApplyException;
 import org.eclipse.jgit.api.errors.PatchFormatException;
+import org.eclipse.jgit.attributes.FilterCommand;
+import org.eclipse.jgit.attributes.FilterCommandRegistry;
 import org.eclipse.jgit.diff.DiffEntry.ChangeType;
 import org.eclipse.jgit.diff.RawText;
+import org.eclipse.jgit.dircache.DirCache;
+import org.eclipse.jgit.dircache.DirCacheCheckout;
+import org.eclipse.jgit.dircache.DirCacheCheckout.CheckoutMetadata;
+import org.eclipse.jgit.dircache.DirCacheIterator;
+import org.eclipse.jgit.errors.LargeObjectException;
+import org.eclipse.jgit.errors.MissingObjectException;
 import org.eclipse.jgit.internal.JGitText;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.CoreConfig.EolStreamType;
 import org.eclipse.jgit.lib.FileMode;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.ObjectLoader;
+import org.eclipse.jgit.lib.ObjectStream;
 import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.patch.BinaryHunk;
 import org.eclipse.jgit.patch.FileHeader;
+import org.eclipse.jgit.patch.FileHeader.PatchType;
 import org.eclipse.jgit.patch.HunkHeader;
 import org.eclipse.jgit.patch.Patch;
+import org.eclipse.jgit.treewalk.FileTreeIterator;
+import org.eclipse.jgit.treewalk.TreeWalk;
+import org.eclipse.jgit.treewalk.TreeWalk.OperationType;
+import org.eclipse.jgit.treewalk.filter.AndTreeFilter;
+import org.eclipse.jgit.treewalk.filter.NotIgnoredFilter;
+import org.eclipse.jgit.treewalk.filter.PathFilterGroup;
+import org.eclipse.jgit.util.FS;
+import org.eclipse.jgit.util.FS.ExecutionResult;
 import org.eclipse.jgit.util.FileUtils;
+import org.eclipse.jgit.util.IO;
+import org.eclipse.jgit.util.RawParseUtils;
+import org.eclipse.jgit.util.StringUtils;
+import org.eclipse.jgit.util.TemporaryBuffer;
+import org.eclipse.jgit.util.TemporaryBuffer.LocalFile;
+import org.eclipse.jgit.util.io.BinaryDeltaInputStream;
+import org.eclipse.jgit.util.io.BinaryHunkInputStream;
+import org.eclipse.jgit.util.io.EolStreamTypeUtil;
+import org.eclipse.jgit.util.sha1.SHA1;
 
 /**
  * Apply a patch to files and/or to the index.
@@ -45,7 +84,7 @@
 	private InputStream in;
 
 	/**
-	 * Constructs the command if the patch is to be applied to the index.
+	 * Constructs the command.
 	 *
 	 * @param repo
 	 */
@@ -79,6 +118,7 @@
 	public ApplyResult call() throws GitAPIException, PatchFormatException,
 			PatchApplyException {
 		checkCallable();
+		setCallable(false);
 		ApplyResult r = new ApplyResult();
 		try {
 			final Patch p = new Patch();
@@ -87,19 +127,22 @@
 			} finally {
 				in.close();
 			}
-			if (!p.getErrors().isEmpty())
+			if (!p.getErrors().isEmpty()) {
 				throw new PatchFormatException(p.getErrors());
+			}
+			Repository repository = getRepository();
+			DirCache cache = repository.readDirCache();
 			for (FileHeader fh : p.getFiles()) {
 				ChangeType type = fh.getChangeType();
 				File f = null;
 				switch (type) {
 				case ADD:
 					f = getFile(fh.getNewPath(), true);
-					apply(f, fh);
+					apply(repository, fh.getNewPath(), cache, f, fh);
 					break;
 				case MODIFY:
 					f = getFile(fh.getOldPath(), false);
-					apply(f, fh);
+					apply(repository, fh.getOldPath(), cache, f, fh);
 					break;
 				case DELETE:
 					f = getFile(fh.getOldPath(), false);
@@ -118,14 +161,14 @@
 						throw new PatchApplyException(MessageFormat.format(
 								JGitText.get().renameFileFailed, f, dest), e);
 					}
-					apply(dest, fh);
+					apply(repository, fh.getOldPath(), cache, dest, fh);
 					break;
 				case COPY:
 					f = getFile(fh.getOldPath(), false);
 					File target = getFile(fh.getNewPath(), false);
 					FileUtils.mkdirs(target.getParentFile(), true);
 					Files.copy(f.toPath(), target.toPath());
-					apply(target, fh);
+					apply(repository, fh.getOldPath(), cache, target, fh);
 				}
 				r.addUpdatedFile(f);
 			}
@@ -133,14 +176,13 @@
 			throw new PatchApplyException(MessageFormat.format(
 					JGitText.get().patchApplyException, e.getMessage()), e);
 		}
-		setCallable(false);
 		return r;
 	}
 
 	private File getFile(String path, boolean create)
 			throws PatchApplyException {
 		File f = new File(getRepository().getWorkTree(), path);
-		if (create)
+		if (create) {
 			try {
 				File parent = f.getParentFile();
 				FileUtils.mkdirs(parent, true);
@@ -149,22 +191,366 @@
 				throw new PatchApplyException(MessageFormat.format(
 						JGitText.get().createNewFileFailed, f), e);
 			}
+		}
 		return f;
 	}
 
+	private void apply(Repository repository, String path, DirCache cache,
+			File f, FileHeader fh) throws IOException, PatchApplyException {
+		if (PatchType.BINARY.equals(fh.getPatchType())) {
+			return;
+		}
+		boolean convertCrLf = needsCrLfConversion(f, fh);
+		// Use a TreeWalk with a DirCacheIterator to pick up the correct
+		// clean/smudge filters. CR-LF handling is completely determined by
+		// whether the file or the patch have CR-LF line endings.
+		try (TreeWalk walk = new TreeWalk(repository)) {
+			walk.setOperationType(OperationType.CHECKIN_OP);
+			FileTreeIterator files = new FileTreeIterator(repository);
+			int fileIdx = walk.addTree(files);
+			int cacheIdx = walk.addTree(new DirCacheIterator(cache));
+			files.setDirCacheIterator(walk, cacheIdx);
+			walk.setFilter(AndTreeFilter.create(
+					PathFilterGroup.createFromStrings(path),
+					new NotIgnoredFilter(fileIdx)));
+			walk.setRecursive(true);
+			if (walk.next()) {
+				// If the file on disk has no newline characters, convertCrLf
+				// will be false. In that case we want to honor the normal git
+				// settings.
+				EolStreamType streamType = convertCrLf ? EolStreamType.TEXT_CRLF
+						: walk.getEolStreamType(OperationType.CHECKOUT_OP);
+				String command = walk.getFilterCommand(
+						Constants.ATTR_FILTER_TYPE_SMUDGE);
+				CheckoutMetadata checkOut = new CheckoutMetadata(streamType, command);
+				FileTreeIterator file = walk.getTree(fileIdx,
+						FileTreeIterator.class);
+				if (file != null) {
+					if (PatchType.GIT_BINARY.equals(fh.getPatchType())) {
+						applyBinary(repository, path, f, fh,
+								file::openEntryStream, file.getEntryObjectId(),
+								checkOut);
+					} else {
+						command = walk.getFilterCommand(
+								Constants.ATTR_FILTER_TYPE_CLEAN);
+						RawText raw;
+						// Can't use file.openEntryStream() as it would do CR-LF
+						// conversion as usual, not as wanted by us.
+						try (InputStream input = filterClean(repository, path,
+								new FileInputStream(f), convertCrLf, command)) {
+							raw = new RawText(
+									IO.readWholeStream(input, 0).array());
+						}
+						applyText(repository, path, raw, f, fh, checkOut);
+					}
+					return;
+				}
+			}
+		}
+		// File ignored?
+		RawText raw;
+		CheckoutMetadata checkOut;
+		if (PatchType.GIT_BINARY.equals(fh.getPatchType())) {
+			checkOut = new CheckoutMetadata(EolStreamType.DIRECT, null);
+			applyBinary(repository, path, f, fh, () -> new FileInputStream(f),
+					null, checkOut);
+		} else {
+			if (convertCrLf) {
+				try (InputStream input = EolStreamTypeUtil.wrapInputStream(
+						new FileInputStream(f), EolStreamType.TEXT_LF)) {
+					raw = new RawText(IO.readWholeStream(input, 0).array());
+				}
+				checkOut = new CheckoutMetadata(EolStreamType.TEXT_CRLF, null);
+			} else {
+				raw = new RawText(f);
+				checkOut = new CheckoutMetadata(EolStreamType.DIRECT, null);
+			}
+			applyText(repository, path, raw, f, fh, checkOut);
+		}
+	}
+
+	private boolean needsCrLfConversion(File f, FileHeader fileHeader)
+			throws IOException {
+		if (PatchType.GIT_BINARY.equals(fileHeader.getPatchType())) {
+			return false;
+		}
+		if (!hasCrLf(fileHeader)) {
+			try (InputStream input = new FileInputStream(f)) {
+				return RawText.isCrLfText(input);
+			}
+		}
+		return false;
+	}
+
+	private static boolean hasCrLf(FileHeader fileHeader) {
+		if (PatchType.GIT_BINARY.equals(fileHeader.getPatchType())) {
+			return false;
+		}
+		for (HunkHeader header : fileHeader.getHunks()) {
+			byte[] buf = header.getBuffer();
+			int hunkEnd = header.getEndOffset();
+			int lineStart = header.getStartOffset();
+			while (lineStart < hunkEnd) {
+				int nextLineStart = RawParseUtils.nextLF(buf, lineStart);
+				if (nextLineStart > hunkEnd) {
+					nextLineStart = hunkEnd;
+				}
+				if (nextLineStart <= lineStart) {
+					break;
+				}
+				if (nextLineStart - lineStart > 1) {
+					char first = (char) (buf[lineStart] & 0xFF);
+					if (first == ' ' || first == '-') {
+						// It's an old line. Does it end in CR-LF?
+						if (buf[nextLineStart - 2] == '\r') {
+							return true;
+						}
+					}
+				}
+				lineStart = nextLineStart;
+			}
+		}
+		return false;
+	}
+
+	private InputStream filterClean(Repository repository, String path,
+			InputStream fromFile, boolean convertCrLf, String filterCommand)
+			throws IOException {
+		InputStream input = fromFile;
+		if (convertCrLf) {
+			input = EolStreamTypeUtil.wrapInputStream(input,
+					EolStreamType.TEXT_LF);
+		}
+		if (StringUtils.isEmptyOrNull(filterCommand)) {
+			return input;
+		}
+		if (FilterCommandRegistry.isRegistered(filterCommand)) {
+			LocalFile buffer = new TemporaryBuffer.LocalFile(null);
+			FilterCommand command = FilterCommandRegistry.createFilterCommand(
+					filterCommand, repository, input, buffer);
+			while (command.run() != -1) {
+				// loop as long as command.run() tells there is work to do
+			}
+			return buffer.openInputStreamWithAutoDestroy();
+		}
+		FS fs = repository.getFS();
+		ProcessBuilder filterProcessBuilder = fs.runInShell(filterCommand,
+				new String[0]);
+		filterProcessBuilder.directory(repository.getWorkTree());
+		filterProcessBuilder.environment().put(Constants.GIT_DIR_KEY,
+				repository.getDirectory().getAbsolutePath());
+		ExecutionResult result;
+		try {
+			result = fs.execute(filterProcessBuilder, in);
+		} catch (IOException | InterruptedException e) {
+			throw new IOException(
+					new FilterFailedException(e, filterCommand, path));
+		}
+		int rc = result.getRc();
+		if (rc != 0) {
+			throw new IOException(new FilterFailedException(rc, filterCommand,
+					path, result.getStdout().toByteArray(4096), RawParseUtils
+							.decode(result.getStderr().toByteArray(4096))));
+		}
+		return result.getStdout().openInputStreamWithAutoDestroy();
+	}
+
 	/**
-	 * @param f
-	 * @param fh
-	 * @throws IOException
-	 * @throws PatchApplyException
+	 * Something that can supply an {@link InputStream}.
 	 */
-	private void apply(File f, FileHeader fh)
+	private interface StreamSupplier {
+		InputStream load() throws IOException;
+	}
+
+	/**
+	 * We write the patch result to a {@link TemporaryBuffer} and then use
+	 * {@link DirCacheCheckout}.getContent() to run the result through the CR-LF
+	 * and smudge filters. DirCacheCheckout needs an ObjectLoader, not a
+	 * TemporaryBuffer, so this class bridges between the two, making any Stream
+	 * provided by a {@link StreamSupplier} look like an ordinary git blob to
+	 * DirCacheCheckout.
+	 */
+	private static class StreamLoader extends ObjectLoader {
+
+		private StreamSupplier data;
+
+		private long size;
+
+		StreamLoader(StreamSupplier data, long length) {
+			this.data = data;
+			this.size = length;
+		}
+
+		@Override
+		public int getType() {
+			return Constants.OBJ_BLOB;
+		}
+
+		@Override
+		public long getSize() {
+			return size;
+		}
+
+		@Override
+		public boolean isLarge() {
+			return true;
+		}
+
+		@Override
+		public byte[] getCachedBytes() throws LargeObjectException {
+			throw new LargeObjectException();
+		}
+
+		@Override
+		public ObjectStream openStream()
+				throws MissingObjectException, IOException {
+			return new ObjectStream.Filter(getType(), getSize(),
+					new BufferedInputStream(data.load()));
+		}
+	}
+
+	private void initHash(SHA1 hash, long size) {
+		hash.update(Constants.encodedTypeString(Constants.OBJ_BLOB));
+		hash.update((byte) ' ');
+		hash.update(Constants.encodeASCII(size));
+		hash.update((byte) 0);
+	}
+
+	private ObjectId hash(File f) throws IOException {
+		SHA1 hash = SHA1.newInstance();
+		initHash(hash, f.length());
+		try (InputStream input = new FileInputStream(f)) {
+			byte[] buf = new byte[8192];
+			int n;
+			while ((n = input.read(buf)) >= 0) {
+				hash.update(buf, 0, n);
+			}
+		}
+		return hash.toObjectId();
+	}
+
+	private void checkOid(ObjectId baseId, ObjectId id, ChangeType type, File f,
+			String path)
+			throws PatchApplyException, IOException {
+		boolean hashOk = false;
+		if (id != null) {
+			hashOk = baseId.equals(id);
+			if (!hashOk && ChangeType.ADD.equals(type)
+					&& ObjectId.zeroId().equals(baseId)) {
+				// We create the file first. The OID of an empty file is not the
+				// zero id!
+				hashOk = Constants.EMPTY_BLOB_ID.equals(id);
+			}
+		} else {
+			if (ObjectId.zeroId().equals(baseId)) {
+				// File empty is OK.
+				hashOk = !f.exists() || f.length() == 0;
+			} else {
+				hashOk = baseId.equals(hash(f));
+			}
+		}
+		if (!hashOk) {
+			throw new PatchApplyException(MessageFormat
+					.format(JGitText.get().applyBinaryBaseOidWrong, path));
+		}
+	}
+
+	private void applyBinary(Repository repository, String path, File f,
+			FileHeader fh, StreamSupplier loader, ObjectId id,
+			CheckoutMetadata checkOut)
+			throws PatchApplyException, IOException {
+		if (!fh.getOldId().isComplete() || !fh.getNewId().isComplete()) {
+			throw new PatchApplyException(MessageFormat
+					.format(JGitText.get().applyBinaryOidTooShort, path));
+		}
+		BinaryHunk hunk = fh.getForwardBinaryHunk();
+		// A BinaryHunk has the start at the "literal" or "delta" token. Data
+		// starts on the next line.
+		int start = RawParseUtils.nextLF(hunk.getBuffer(),
+				hunk.getStartOffset());
+		int length = hunk.getEndOffset() - start;
+		SHA1 hash = SHA1.newInstance();
+		// Write to a buffer and copy to the file only if everything was fine
+		TemporaryBuffer buffer = new TemporaryBuffer.LocalFile(null);
+		try {
+			switch (hunk.getType()) {
+			case LITERAL_DEFLATED:
+				// This just overwrites the file. We need to check the hash of
+				// the base.
+				checkOid(fh.getOldId().toObjectId(), id, fh.getChangeType(), f,
+						path);
+				initHash(hash, hunk.getSize());
+				try (OutputStream out = buffer;
+						InputStream inflated = new SHA1InputStream(hash,
+								new InflaterInputStream(
+										new BinaryHunkInputStream(
+												new ByteArrayInputStream(
+														hunk.getBuffer(), start,
+														length))))) {
+					DirCacheCheckout.getContent(repository, path, checkOut,
+							new StreamLoader(() -> inflated, hunk.getSize()),
+							null, out);
+					if (!fh.getNewId().toObjectId().equals(hash.toObjectId())) {
+						throw new PatchApplyException(MessageFormat.format(
+								JGitText.get().applyBinaryResultOidWrong,
+								path));
+					}
+				}
+				try (InputStream bufIn = buffer.openInputStream()) {
+					Files.copy(bufIn, f.toPath(),
+							StandardCopyOption.REPLACE_EXISTING);
+				}
+				break;
+			case DELTA_DEFLATED:
+				// Unfortunately delta application needs random access to the
+				// base to construct the result.
+				byte[] base;
+				try (InputStream input = loader.load()) {
+					base = IO.readWholeStream(input, 0).array();
+				}
+				// At least stream the result!
+				try (BinaryDeltaInputStream input = new BinaryDeltaInputStream(
+						base,
+						new InflaterInputStream(new BinaryHunkInputStream(
+								new ByteArrayInputStream(hunk.getBuffer(),
+										start, length))))) {
+					long finalSize = input.getExpectedResultSize();
+					initHash(hash, finalSize);
+					try (OutputStream out = buffer;
+							SHA1InputStream hashed = new SHA1InputStream(hash,
+									input)) {
+						DirCacheCheckout.getContent(repository, path, checkOut,
+								new StreamLoader(() -> hashed, finalSize), null,
+								out);
+						if (!fh.getNewId().toObjectId()
+								.equals(hash.toObjectId())) {
+							throw new PatchApplyException(MessageFormat.format(
+									JGitText.get().applyBinaryResultOidWrong,
+									path));
+						}
+					}
+				}
+				try (InputStream bufIn = buffer.openInputStream()) {
+					Files.copy(bufIn, f.toPath(),
+							StandardCopyOption.REPLACE_EXISTING);
+				}
+				break;
+			default:
+				break;
+			}
+		} finally {
+			buffer.destroy();
+		}
+	}
+
+	private void applyText(Repository repository, String path, RawText rt,
+			File f, FileHeader fh, CheckoutMetadata checkOut)
 			throws IOException, PatchApplyException {
-		RawText rt = new RawText(f);
-		List<String> oldLines = new ArrayList<>(rt.size());
-		for (int i = 0; i < rt.size(); i++)
-			oldLines.add(rt.getString(i));
-		List<String> newLines = new ArrayList<>(oldLines);
+		List<ByteBuffer> oldLines = new ArrayList<>(rt.size());
+		for (int i = 0; i < rt.size(); i++) {
+			oldLines.add(rt.getRawString(i));
+		}
+		List<ByteBuffer> newLines = new ArrayList<>(oldLines);
 		int afterLastHunk = 0;
 		int lineNumberShift = 0;
 		int lastHunkNewLine = -1;
@@ -182,9 +568,9 @@
 					b.length);
 			RawText hrt = new RawText(b);
 
-			List<String> hunkLines = new ArrayList<>(hrt.size());
+			List<ByteBuffer> hunkLines = new ArrayList<>(hrt.size());
 			for (int i = 0; i < hrt.size(); i++) {
-				hunkLines.add(hrt.getString(i));
+				hunkLines.add(hrt.getRawString(i));
 			}
 
 			if (hh.getNewStartLine() == 0) {
@@ -253,8 +639,13 @@
 			lineNumberShift = applyAt - hh.getNewStartLine() + 1;
 			int sz = hunkLines.size();
 			for (int j = 1; j < sz; j++) {
-				String hunkLine = hunkLines.get(j);
-				switch (hunkLine.charAt(0)) {
+				ByteBuffer hunkLine = hunkLines.get(j);
+				if (!hunkLine.hasRemaining()) {
+					// Completely empty line; accept as empty context line
+					applyAt++;
+					continue;
+				}
+				switch (hunkLine.array()[hunkLine.position()]) {
 				case ' ':
 					applyAt++;
 					break;
@@ -262,7 +653,7 @@
 					newLines.remove(applyAt);
 					break;
 				case '+':
-					newLines.add(applyAt++, hunkLine.substring(1));
+					newLines.add(applyAt++, slice(hunkLine, 1));
 					break;
 				default:
 					break;
@@ -271,39 +662,64 @@
 			afterLastHunk = applyAt;
 		}
 		if (!isNoNewlineAtEndOfFile(fh)) {
-			newLines.add(""); //$NON-NLS-1$
+			newLines.add(null);
 		}
 		if (!rt.isMissingNewlineAtEnd()) {
-			oldLines.add(""); //$NON-NLS-1$
+			oldLines.add(null);
 		}
-		if (!isChanged(oldLines, newLines)) {
-			return; // Don't touch the file
+		if (oldLines.equals(newLines)) {
+			return; // Unchanged; don't touch the file
 		}
-		try (Writer fw = Files.newBufferedWriter(f.toPath())) {
-			for (Iterator<String> l = newLines.iterator(); l.hasNext();) {
-				fw.write(l.next());
-				if (l.hasNext()) {
-					// Don't bother handling line endings - if it was Windows,
-					// the \r is still there!
-					fw.write('\n');
+
+		TemporaryBuffer buffer = new TemporaryBuffer.LocalFile(null);
+		try {
+			try (OutputStream out = buffer) {
+				for (Iterator<ByteBuffer> l = newLines.iterator(); l
+						.hasNext();) {
+					ByteBuffer line = l.next();
+					if (line == null) {
+						// Must be the marker for the final newline
+						break;
+					}
+					out.write(line.array(), line.position(), line.remaining());
+					if (l.hasNext()) {
+						out.write('\n');
+					}
 				}
 			}
+			try (OutputStream output = new FileOutputStream(f)) {
+				DirCacheCheckout.getContent(repository, path, checkOut,
+						new StreamLoader(buffer::openInputStream,
+								buffer.length()),
+						null, output);
+			}
+		} finally {
+			buffer.destroy();
 		}
-		getRepository().getFS().setExecute(f, fh.getNewMode() == FileMode.EXECUTABLE_FILE);
+		repository.getFS().setExecute(f,
+				fh.getNewMode() == FileMode.EXECUTABLE_FILE);
 	}
 
-	private boolean canApplyAt(List<String> hunkLines, List<String> newLines,
-			int line) {
+	private boolean canApplyAt(List<ByteBuffer> hunkLines,
+			List<ByteBuffer> newLines, int line) {
 		int sz = hunkLines.size();
 		int limit = newLines.size();
 		int pos = line;
 		for (int j = 1; j < sz; j++) {
-			String hunkLine = hunkLines.get(j);
-			switch (hunkLine.charAt(0)) {
+			ByteBuffer hunkLine = hunkLines.get(j);
+			if (!hunkLine.hasRemaining()) {
+				// Empty line. Accept as empty context line.
+				if (pos >= limit || newLines.get(pos).hasRemaining()) {
+					return false;
+				}
+				pos++;
+				continue;
+			}
+			switch (hunkLine.array()[hunkLine.position()]) {
 			case ' ':
 			case '-':
 				if (pos >= limit
-						|| !newLines.get(pos).equals(hunkLine.substring(1))) {
+						|| !newLines.get(pos).equals(slice(hunkLine, 1))) {
 					return false;
 				}
 				pos++;
@@ -315,13 +731,9 @@
 		return true;
 	}
 
-	private static boolean isChanged(List<String> ol, List<String> nl) {
-		if (ol.size() != nl.size())
-			return true;
-		for (int i = 0; i < ol.size(); i++)
-			if (!ol.get(i).equals(nl.get(i)))
-				return true;
-		return false;
+	private ByteBuffer slice(ByteBuffer b, int off) {
+		int newOffset = b.position() + off;
+		return ByteBuffer.wrap(b.array(), newOffset, b.limit() - newOffset);
 	}
 
 	private boolean isNoNewlineAtEndOfFile(FileHeader fh) {
@@ -330,8 +742,51 @@
 			return false;
 		}
 		HunkHeader lastHunk = hunks.get(hunks.size() - 1);
-		RawText lhrt = new RawText(lastHunk.getBuffer());
+		byte[] buf = new byte[lastHunk.getEndOffset()
+				- lastHunk.getStartOffset()];
+		System.arraycopy(lastHunk.getBuffer(), lastHunk.getStartOffset(), buf,
+				0, buf.length);
+		RawText lhrt = new RawText(buf);
 		return lhrt.getString(lhrt.size() - 1)
 				.equals("\\ No newline at end of file"); //$NON-NLS-1$
 	}
+
+	/**
+	 * An {@link InputStream} that updates a {@link SHA1} on every byte read.
+	 * The hash is supposed to have been initialized before reading starts.
+	 */
+	private static class SHA1InputStream extends InputStream {
+
+		private final SHA1 hash;
+
+		private final InputStream in;
+
+		SHA1InputStream(SHA1 hash, InputStream in) {
+			this.hash = hash;
+			this.in = in;
+		}
+
+		@Override
+		public int read() throws IOException {
+			int b = in.read();
+			if (b >= 0) {
+				hash.update((byte) b);
+			}
+			return b;
+		}
+
+		@Override
+		public int read(byte[] b, int off, int len) throws IOException {
+			int n = in.read(b, off, len);
+			if (n > 0) {
+				hash.update(b, off, n);
+			}
+			return n;
+		}
+
+		@Override
+		public void close() throws IOException {
+			in.close();
+		}
+	}
 }
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java
index 5d0154c..7922f9e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010, Christian Halstrick <christian.halstrick@sap.com> and others
+ * Copyright (C) 2010, 2021 Christian Halstrick <christian.halstrick@sap.com> and others
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Distribution License v. 1.0 which is available at
@@ -13,6 +13,7 @@
 import java.text.MessageFormat;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Map;
 
 import org.eclipse.jgit.api.errors.ConcurrentRefUpdateException;
 import org.eclipse.jgit.api.errors.GitAPIException;
@@ -35,9 +36,12 @@
 import org.eclipse.jgit.lib.Ref;
 import org.eclipse.jgit.lib.Ref.Storage;
 import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.merge.ContentMergeStrategy;
 import org.eclipse.jgit.merge.MergeMessageFormatter;
 import org.eclipse.jgit.merge.MergeStrategy;
+import org.eclipse.jgit.merge.Merger;
 import org.eclipse.jgit.merge.ResolveMerger;
+import org.eclipse.jgit.merge.ResolveMerger.MergeFailureReason;
 import org.eclipse.jgit.revwalk.RevCommit;
 import org.eclipse.jgit.revwalk.RevWalk;
 import org.eclipse.jgit.treewalk.FileTreeIterator;
@@ -61,6 +65,8 @@
 
 	private MergeStrategy strategy = MergeStrategy.RECURSIVE;
 
+	private ContentMergeStrategy contentStrategy;
+
 	private Integer mainlineParentNumber;
 
 	private boolean noCommit = false;
@@ -121,16 +127,30 @@
 				String cherryPickName = srcCommit.getId().abbreviate(7).name()
 						+ " " + srcCommit.getShortMessage(); //$NON-NLS-1$
 
-				ResolveMerger merger = (ResolveMerger) strategy.newMerger(repo);
-				merger.setWorkingTreeIterator(new FileTreeIterator(repo));
-				merger.setBase(srcParent.getTree());
-				merger.setCommitNames(new String[] { "BASE", ourName, //$NON-NLS-1$
-						cherryPickName });
-				if (merger.merge(newHead, srcCommit)) {
-					if (!merger.getModifiedFiles().isEmpty()) {
+				Merger merger = strategy.newMerger(repo);
+				merger.setProgressMonitor(monitor);
+				boolean noProblems;
+				Map<String, MergeFailureReason> failingPaths = null;
+				List<String> unmergedPaths = null;
+				if (merger instanceof ResolveMerger) {
+					ResolveMerger resolveMerger = (ResolveMerger) merger;
+					resolveMerger.setContentMergeStrategy(contentStrategy);
+					resolveMerger.setCommitNames(
+							new String[] { "BASE", ourName, cherryPickName }); //$NON-NLS-1$
+					resolveMerger
+							.setWorkingTreeIterator(new FileTreeIterator(repo));
+					resolveMerger.setBase(srcParent.getTree());
+					noProblems = merger.merge(newHead, srcCommit);
+					failingPaths = resolveMerger.getFailingPaths();
+					unmergedPaths = resolveMerger.getUnmergedPaths();
+					if (!resolveMerger.getModifiedFiles().isEmpty()) {
 						repo.fireEvent(new WorkingTreeModifiedEvent(
-								merger.getModifiedFiles(), null));
+								resolveMerger.getModifiedFiles(), null));
 					}
+				} else {
+					noProblems = merger.merge(newHead, srcCommit);
+				}
+				if (noProblems) {
 					if (AnyObjectId.isEqual(newHead.getTree().getId(),
 							merger.getResultTreeId())) {
 						continue;
@@ -153,24 +173,26 @@
 					}
 					cherryPickedRefs.add(src);
 				} else {
-					if (merger.failed()) {
-						return new CherryPickResult(merger.getFailingPaths());
+					if (failingPaths != null && !failingPaths.isEmpty()) {
+						return new CherryPickResult(failingPaths);
 					}
 
 					// there are merge conflicts
 
-					String message = new MergeMessageFormatter()
+					String message;
+					if (unmergedPaths != null) {
+						message = new MergeMessageFormatter()
 							.formatWithConflicts(srcCommit.getFullMessage(),
-									merger.getUnmergedPaths());
+										unmergedPaths);
+					} else {
+						message = srcCommit.getFullMessage();
+					}
 
 					if (!noCommit) {
 						repo.writeCherryPickHead(srcCommit.getId());
 					}
 					repo.writeMergeCommitMsg(message);
 
-					repo.fireEvent(new WorkingTreeModifiedEvent(
-							merger.getModifiedFiles(), null));
-
 					return CherryPickResult.CONFLICT;
 				}
 			}
@@ -291,6 +313,22 @@
 	}
 
 	/**
+	 * Sets the content merge strategy to use if the
+	 * {@link #setStrategy(MergeStrategy) merge strategy} is "resolve" or
+	 * "recursive".
+	 *
+	 * @param strategy
+	 *            the {@link ContentMergeStrategy} to be used
+	 * @return {@code this}
+	 * @since 5.12
+	 */
+	public CherryPickCommand setContentMergeStrategy(
+			ContentMergeStrategy strategy) {
+		this.contentStrategy = strategy;
+		return this;
+	}
+
+	/**
 	 * Set the (1-based) parent number to diff against
 	 *
 	 * @param mainlineParentNumber
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java
index d88f4ec..ef56d80 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010, Christian Halstrick <christian.halstrick@sap.com>
- * Copyright (C) 2010-2014, Stefan Lay <stefan.lay@sap.com>
- * Copyright (C) 2016, Laurent Delaigue <laurent.delaigue@obeo.fr> and others
+ * Copyright (C) 2010, 2014, Stefan Lay <stefan.lay@sap.com>
+ * Copyright (C) 2016, 2021 Laurent Delaigue <laurent.delaigue@obeo.fr> and others
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Distribution License v. 1.0 which is available at
@@ -45,6 +45,7 @@
 import org.eclipse.jgit.lib.RefUpdate;
 import org.eclipse.jgit.lib.RefUpdate.Result;
 import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.merge.ContentMergeStrategy;
 import org.eclipse.jgit.merge.MergeConfig;
 import org.eclipse.jgit.merge.MergeMessageFormatter;
 import org.eclipse.jgit.merge.MergeStrategy;
@@ -71,6 +72,8 @@
 
 	private MergeStrategy mergeStrategy = MergeStrategy.RECURSIVE;
 
+	private ContentMergeStrategy contentStrategy;
+
 	private List<Ref> commits = new LinkedList<>();
 
 	private Boolean squash;
@@ -84,6 +87,20 @@
 	private ProgressMonitor monitor = NullProgressMonitor.INSTANCE;
 
 	/**
+	 * Values for the "merge.conflictStyle" git config.
+	 *
+	 * @since 5.12
+	 */
+	public enum ConflictStyle {
+
+		/** "merge" style: only ours/theirs. This is the default. */
+		MERGE,
+
+		/** "diff3" style: ours/base/theirs. */
+		DIFF3
+	}
+
+	/**
 	 * The modes available for fast forward merges corresponding to the
 	 * <code>--ff</code>, <code>--no-ff</code> and <code>--ff-only</code>
 	 * options under <code>branch.&lt;name&gt;.mergeoptions</code>.
@@ -320,6 +337,7 @@
 				List<String> unmergedPaths = null;
 				if (merger instanceof ResolveMerger) {
 					ResolveMerger resolveMerger = (ResolveMerger) merger;
+					resolveMerger.setContentMergeStrategy(contentStrategy);
 					resolveMerger.setCommitNames(new String[] {
 							"BASE", "HEAD", ref.getName() }); //$NON-NLS-1$ //$NON-NLS-2$
 					resolveMerger.setWorkingTreeIterator(new FileTreeIterator(repo));
@@ -473,6 +491,22 @@
 	}
 
 	/**
+	 * Sets the content merge strategy to use if the
+	 * {@link #setStrategy(MergeStrategy) merge strategy} is "resolve" or
+	 * "recursive".
+	 *
+	 * @param strategy
+	 *            the {@link ContentMergeStrategy} to be used
+	 * @return {@code this}
+	 * @since 5.12
+	 */
+	public MergeCommand setContentMergeStrategy(ContentMergeStrategy strategy) {
+		checkCallable();
+		this.contentStrategy = strategy;
+		return this;
+	}
+
+	/**
 	 * Reference to a commit to be merged with the current head
 	 *
 	 * @param aCommit
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java
index 4492508..281ecfd 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010, Christian Halstrick <christian.halstrick@sap.com>
  * Copyright (C) 2010, Mathias Kinzler <mathias.kinzler@sap.com>
- * Copyright (C) 2016, Laurent Delaigue <laurent.delaigue@obeo.fr> and others
+ * Copyright (C) 2016, 2021 Laurent Delaigue <laurent.delaigue@obeo.fr> and others
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Distribution License v. 1.0 which is available at
@@ -43,6 +43,7 @@
 import org.eclipse.jgit.lib.Repository;
 import org.eclipse.jgit.lib.RepositoryState;
 import org.eclipse.jgit.lib.SubmoduleConfig.FetchRecurseSubmodulesMode;
+import org.eclipse.jgit.merge.ContentMergeStrategy;
 import org.eclipse.jgit.merge.MergeStrategy;
 import org.eclipse.jgit.revwalk.RevCommit;
 import org.eclipse.jgit.revwalk.RevWalk;
@@ -69,6 +70,8 @@
 
 	private MergeStrategy strategy = MergeStrategy.RECURSIVE;
 
+	private ContentMergeStrategy contentStrategy;
+
 	private TagOpt tagOption;
 
 	private FastForwardMode fastForwardMode;
@@ -275,8 +278,7 @@
 					JGitText.get().pullTaskName));
 
 		// we check the updates to see which of the updated branches
-		// corresponds
-		// to the remote branch name
+		// corresponds to the remote branch name
 		AnyObjectId commitToMerge;
 		if (isRemote) {
 			Ref r = null;
@@ -354,8 +356,11 @@
 			}
 			RebaseCommand rebase = new RebaseCommand(repo);
 			RebaseResult rebaseRes = rebase.setUpstream(commitToMerge)
-					.setUpstreamName(upstreamName).setProgressMonitor(monitor)
-					.setOperation(Operation.BEGIN).setStrategy(strategy)
+					.setProgressMonitor(monitor)
+					.setUpstreamName(upstreamName)
+					.setOperation(Operation.BEGIN)
+					.setStrategy(strategy)
+					.setContentMergeStrategy(contentStrategy)
 					.setPreserveMerges(
 							pullRebaseMode == BranchRebaseMode.PRESERVE)
 					.call();
@@ -363,7 +368,9 @@
 		} else {
 			MergeCommand merge = new MergeCommand(repo);
 			MergeResult mergeRes = merge.include(upstreamName, commitToMerge)
-					.setStrategy(strategy).setProgressMonitor(monitor)
+					.setProgressMonitor(monitor)
+					.setStrategy(strategy)
+					.setContentMergeStrategy(contentStrategy)
 					.setFastForward(getFastForwardMode()).call();
 			monitor.update(1);
 			result = new PullResult(fetchRes, remote, mergeRes);
@@ -442,6 +449,21 @@
 	}
 
 	/**
+	 * Sets the content merge strategy to use if the
+	 * {@link #setStrategy(MergeStrategy) merge strategy} is "resolve" or
+	 * "recursive".
+	 *
+	 * @param strategy
+	 *            the {@link ContentMergeStrategy} to be used
+	 * @return {@code this}
+	 * @since 5.12
+	 */
+	public PullCommand setContentMergeStrategy(ContentMergeStrategy strategy) {
+		this.contentStrategy = strategy;
+		return this;
+	}
+
+	/**
 	 * Set the specification of annotated tag behavior during fetch
 	 *
 	 * @param tagOpt
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
index 836175d..a26ffc2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010, 2013 Mathias Kinzler <mathias.kinzler@sap.com>
- * Copyright (C) 2016, Laurent Delaigue <laurent.delaigue@obeo.fr> and others
+ * Copyright (C) 2016, 2021 Laurent Delaigue <laurent.delaigue@obeo.fr> and others
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Distribution License v. 1.0 which is available at
@@ -65,6 +65,7 @@
 import org.eclipse.jgit.lib.RefUpdate;
 import org.eclipse.jgit.lib.RefUpdate.Result;
 import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.merge.ContentMergeStrategy;
 import org.eclipse.jgit.merge.MergeStrategy;
 import org.eclipse.jgit.revwalk.RevCommit;
 import org.eclipse.jgit.revwalk.RevSort;
@@ -212,6 +213,8 @@
 
 	private MergeStrategy strategy = MergeStrategy.RECURSIVE;
 
+	private ContentMergeStrategy contentStrategy;
+
 	private boolean preserveMerges = false;
 
 	/**
@@ -501,8 +504,11 @@
 			String ourCommitName = getOurCommitName();
 			try (Git git = new Git(repo)) {
 				CherryPickResult cherryPickResult = git.cherryPick()
-					.include(commitToPick).setOurCommitName(ourCommitName)
-					.setReflogPrefix(REFLOG_PREFIX).setStrategy(strategy)
+					.include(commitToPick)
+					.setOurCommitName(ourCommitName)
+					.setReflogPrefix(REFLOG_PREFIX)
+					.setStrategy(strategy)
+					.setContentMergeStrategy(contentStrategy)
 					.call();
 				switch (cherryPickResult.getStatus()) {
 				case FAILED:
@@ -556,7 +562,8 @@
 							.include(commitToPick)
 							.setOurCommitName(ourCommitName)
 							.setReflogPrefix(REFLOG_PREFIX)
-							.setStrategy(strategy);
+							.setStrategy(strategy)
+							.setContentMergeStrategy(contentStrategy);
 					if (isMerge) {
 						pickCommand.setMainlineParentNumber(1);
 						// We write a MERGE_HEAD and later commit explicitly
@@ -592,6 +599,8 @@
 					MergeCommand merge = git.merge()
 							.setFastForward(MergeCommand.FastForwardMode.NO_FF)
 							.setProgressMonitor(monitor)
+							.setStrategy(strategy)
+							.setContentMergeStrategy(contentStrategy)
 							.setCommit(false);
 					for (int i = 1; i < commitToPick.getParentCount(); i++)
 						merge.include(newParents.get(i));
@@ -1137,7 +1146,7 @@
 	}
 
 	private List<RevCommit> calculatePickList(RevCommit headCommit)
-			throws GitAPIException, NoHeadException, IOException {
+			throws IOException {
 		List<RevCommit> cherryPickList = new ArrayList<>();
 		try (RevWalk r = new RevWalk(repo)) {
 			r.sort(RevSort.TOPO_KEEP_BRANCH_TOGETHER, true);
@@ -1587,6 +1596,21 @@
 	}
 
 	/**
+	 * Sets the content merge strategy to use if the
+	 * {@link #setStrategy(MergeStrategy) merge strategy} is "resolve" or
+	 * "recursive".
+	 *
+	 * @param strategy
+	 *            the {@link ContentMergeStrategy} to be used
+	 * @return {@code this}
+	 * @since 5.12
+	 */
+	public RebaseCommand setContentMergeStrategy(ContentMergeStrategy strategy) {
+		this.contentStrategy = strategy;
+		return this;
+	}
+
+	/**
 	 * Whether to preserve merges during rebase
 	 *
 	 * @param preserve
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashApplyCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashApplyCommand.java
index 56b3992..1004d3e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashApplyCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashApplyCommand.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012, 2017 GitHub Inc. and others
+ * Copyright (C) 2012, 2021 GitHub Inc. and others
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Distribution License v. 1.0 which is available at
@@ -38,7 +38,9 @@
 import org.eclipse.jgit.lib.ObjectReader;
 import org.eclipse.jgit.lib.Repository;
 import org.eclipse.jgit.lib.RepositoryState;
+import org.eclipse.jgit.merge.ContentMergeStrategy;
 import org.eclipse.jgit.merge.MergeStrategy;
+import org.eclipse.jgit.merge.Merger;
 import org.eclipse.jgit.merge.ResolveMerger;
 import org.eclipse.jgit.revwalk.RevCommit;
 import org.eclipse.jgit.revwalk.RevTree;
@@ -71,6 +73,8 @@
 
 	private MergeStrategy strategy = MergeStrategy.RECURSIVE;
 
+	private ContentMergeStrategy contentStrategy;
+
 	/**
 	 * Create command to apply the changes of a stashed commit
 	 *
@@ -166,16 +170,25 @@
 			if (restoreUntracked && stashCommit.getParentCount() == 3)
 				untrackedCommit = revWalk.parseCommit(stashCommit.getParent(2));
 
-			ResolveMerger merger = (ResolveMerger) strategy.newMerger(repo);
-			merger.setCommitNames(new String[] { "stashed HEAD", "HEAD", //$NON-NLS-1$ //$NON-NLS-2$
-					"stash" }); //$NON-NLS-1$
-			merger.setBase(stashHeadCommit);
-			merger.setWorkingTreeIterator(new FileTreeIterator(repo));
-			boolean mergeSucceeded = merger.merge(headCommit, stashCommit);
-			List<String> modifiedByMerge = merger.getModifiedFiles();
-			if (!modifiedByMerge.isEmpty()) {
-				repo.fireEvent(
-						new WorkingTreeModifiedEvent(modifiedByMerge, null));
+			Merger merger = strategy.newMerger(repo);
+			boolean mergeSucceeded;
+			if (merger instanceof ResolveMerger) {
+				ResolveMerger resolveMerger = (ResolveMerger) merger;
+				resolveMerger
+						.setCommitNames(new String[] { "stashed HEAD", "HEAD", //$NON-NLS-1$ //$NON-NLS-2$
+								"stash" }); //$NON-NLS-1$
+				resolveMerger.setBase(stashHeadCommit);
+				resolveMerger
+						.setWorkingTreeIterator(new FileTreeIterator(repo));
+				resolveMerger.setContentMergeStrategy(contentStrategy);
+				mergeSucceeded = resolveMerger.merge(headCommit, stashCommit);
+				List<String> modifiedByMerge = resolveMerger.getModifiedFiles();
+				if (!modifiedByMerge.isEmpty()) {
+					repo.fireEvent(new WorkingTreeModifiedEvent(modifiedByMerge,
+							null));
+				}
+			} else {
+				mergeSucceeded = merger.merge(headCommit, stashCommit);
 			}
 			if (mergeSucceeded) {
 				DirCache dc = repo.lockDirCache();
@@ -184,11 +197,14 @@
 				dco.setFailOnConflict(true);
 				dco.checkout(); // Ignoring failed deletes....
 				if (restoreIndex) {
-					ResolveMerger ixMerger = (ResolveMerger) strategy
-							.newMerger(repo, true);
-					ixMerger.setCommitNames(new String[] { "stashed HEAD", //$NON-NLS-1$
-							"HEAD", "stashed index" }); //$NON-NLS-1$//$NON-NLS-2$
-					ixMerger.setBase(stashHeadCommit);
+					Merger ixMerger = strategy.newMerger(repo, true);
+					if (ixMerger instanceof ResolveMerger) {
+						ResolveMerger resolveMerger = (ResolveMerger) ixMerger;
+						resolveMerger.setCommitNames(new String[] { "stashed HEAD", //$NON-NLS-1$
+								"HEAD", "stashed index" }); //$NON-NLS-1$//$NON-NLS-2$
+						resolveMerger.setBase(stashHeadCommit);
+						resolveMerger.setContentMergeStrategy(contentStrategy);
+					}
 					boolean ok = ixMerger.merge(headCommit, stashIndexCommit);
 					if (ok) {
 						resetIndex(revWalk
@@ -200,16 +216,20 @@
 				}
 
 				if (untrackedCommit != null) {
-					ResolveMerger untrackedMerger = (ResolveMerger) strategy
-							.newMerger(repo, true);
-					untrackedMerger.setCommitNames(new String[] {
-							"null", "HEAD", "untracked files" }); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
-					// There is no common base for HEAD & untracked files
-					// because the commit for untracked files has no parent. If
-					// we use stashHeadCommit as common base (as in the other
-					// merges) we potentially report conflicts for files
-					// which are not even member of untracked files commit
-					untrackedMerger.setBase(null);
+					Merger untrackedMerger = strategy.newMerger(repo, true);
+					if (untrackedMerger instanceof ResolveMerger) {
+						ResolveMerger resolveMerger = (ResolveMerger) untrackedMerger;
+						resolveMerger.setCommitNames(new String[] { "null", "HEAD", //$NON-NLS-1$//$NON-NLS-2$
+								"untracked files" }); //$NON-NLS-1$
+						// There is no common base for HEAD & untracked files
+						// because the commit for untracked files has no parent.
+						// If we use stashHeadCommit as common base (as in the
+						// other merges) we potentially report conflicts for
+						// files which are not even member of untracked files
+						// commit.
+						resolveMerger.setBase(null);
+						resolveMerger.setContentMergeStrategy(contentStrategy);
+					}
 					boolean ok = untrackedMerger.merge(headCommit,
 							untrackedCommit);
 					if (ok) {
@@ -279,6 +299,23 @@
 	}
 
 	/**
+	 * Sets the content merge strategy to use if the
+	 * {@link #setStrategy(MergeStrategy) merge strategy} is "resolve" or
+	 * "recursive".
+	 *
+	 * @param strategy
+	 *            the {@link ContentMergeStrategy} to be used
+	 * @return {@code this}
+	 * @since 5.12
+	 */
+	public StashApplyCommand setContentMergeStrategy(
+			ContentMergeStrategy strategy) {
+		checkCallable();
+		this.contentStrategy = strategy;
+		return this;
+	}
+
+	/**
 	 * Whether the command should restore untracked files
 	 *
 	 * @param applyUntracked
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java
index 9f4b1fa..d09da01 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2009, Google Inc.
- * Copyright (C) 2008-2009, Johannes E. Schindelin <johannes.schindelin@gmx.de> and others
+ * Copyright (C) 2008-2021, Johannes E. Schindelin <johannes.schindelin@gmx.de> and others
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Distribution License v. 1.0 which is available at
@@ -16,6 +16,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.nio.ByteBuffer;
 
 import org.eclipse.jgit.errors.BinaryBlobException;
 import org.eclipse.jgit.errors.LargeObjectException;
@@ -165,6 +166,27 @@
 	}
 
 	/**
+	 * Get the raw text for a single line.
+	 *
+	 * @param i
+	 *            index of the line to extract. Note this is 0-based, so line
+	 *            number 1 is actually index 0.
+	 * @return the text for the line, without a trailing LF, as a
+	 *         {@link ByteBuffer} that is backed by a slice of the
+	 *         {@link #getRawContent() raw content}, with the buffer's position
+	 *         on the start of the line and the limit at the end.
+	 * @since 5.12
+	 */
+	public ByteBuffer getRawString(int i) {
+		int s = getStart(i);
+		int e = getEnd(i);
+		if (e > 0 && content[e - 1] == '\n') {
+			e--;
+		}
+		return ByteBuffer.wrap(content, s, e - s);
+	}
+
+	/**
 	 * Get the text for a region of lines.
 	 *
 	 * @param begin
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java
index 80e1b18..ba1f63b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java
@@ -12,6 +12,7 @@
 
 import static org.eclipse.jgit.diff.DiffEntry.Side.NEW;
 import static org.eclipse.jgit.diff.DiffEntry.Side.OLD;
+import static org.eclipse.jgit.storage.pack.PackConfig.DEFAULT_BIG_FILE_THRESHOLD;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -97,6 +98,19 @@
 	/** Limit in the number of files to consider for renames. */
 	private int renameLimit;
 
+	/**
+	 * File size threshold (in bytes) for detecting renames. Files larger
+	 * than this size will not be processed for renames.
+	 */
+	private int bigFileThreshold = DEFAULT_BIG_FILE_THRESHOLD;
+
+	/**
+	 * Skip detecting content renames for binary files. Content renames are
+	 * those that are not exact, that is with a slight content modification
+	 * between the two files.
+	 */
+	private boolean skipContentRenamesForBinaryFiles = false;
+
 	/** Set if the number of adds or deletes was over the limit. */
 	private boolean overRenameLimit;
 
@@ -209,6 +223,46 @@
 	}
 
 	/**
+	 * Get file size threshold for detecting renames. Files larger
+	 * than this size will not be processed for rename detection.
+	 *
+	 * @return threshold in bytes of the file size.
+	 * @since 5.12
+	 */
+	public int getBigFileThreshold() { return bigFileThreshold; }
+
+	/**
+	 * Set the file size threshold for detecting renames. Files larger than this
+	 * threshold will be skipped during rename detection computation.
+	 *
+	 * @param threshold file size threshold in bytes.
+	 * @since 5.12
+	 */
+	public void setBigFileThreshold(int threshold) {
+		this.bigFileThreshold = threshold;
+	}
+
+	/**
+	 * Get skipping detecting content renames for binary files.
+	 *
+	 * @return true if content renames should be skipped for binary files, false otherwise.
+	 * @since 5.12
+	 */
+	public boolean getSkipContentRenamesForBinaryFiles() {
+		return skipContentRenamesForBinaryFiles;
+	}
+
+	/**
+	 * Sets skipping detecting content renames for binary files.
+	 *
+	 * @param value true if content renames should be skipped for binary files, false otherwise.
+	 * @since 5.12
+	 */
+	public void setSkipContentRenamesForBinaryFiles(boolean value) {
+		this.skipContentRenamesForBinaryFiles = value;
+	}
+
+	/**
 	 * Check if the detector is over the rename limit.
 	 * <p>
 	 * This method can be invoked either before or after {@code getEntries} has
@@ -493,6 +547,8 @@
 
 			d = new SimilarityRenameDetector(reader, deleted, added);
 			d.setRenameScore(getRenameScore());
+			d.setBigFileThreshold(getBigFileThreshold());
+			d.setSkipBinaryFiles(getSkipContentRenamesForBinaryFiles());
 			d.compute(pm);
 			overRenameLimit |= d.isTableOverflow();
 			deleted = d.getLeftOverSources();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java
index fb6e5df..661369b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java
@@ -102,6 +102,15 @@
 		idGrowAt = growAt(idHashBits);
 	}
 
+	static boolean isBinary(ObjectLoader obj) throws IOException {
+		if (obj.isLarge()) {
+			try (ObjectStream in1 = obj.openStream()) {
+				return RawText.isBinary(in1);
+			}
+		}
+		return RawText.isBinary(obj.getCachedBytes());
+	}
+
 	void hash(ObjectLoader obj) throws MissingObjectException, IOException,
 			TableFullException {
 		if (obj.isLarge()) {
@@ -115,9 +124,7 @@
 	private void hashLargeObject(ObjectLoader obj) throws IOException,
 			TableFullException {
 		boolean text;
-		try (ObjectStream in1 = obj.openStream()) {
-			text = !RawText.isBinary(in1);
-		}
+		text = !isBinary(obj);
 
 		try (ObjectStream in2 = obj.openStream()) {
 			hash(in2, in2.getSize(), text);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityRenameDetector.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityRenameDetector.java
index 74a11a0..5871b4a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityRenameDetector.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityRenameDetector.java
@@ -12,6 +12,7 @@
 
 import static org.eclipse.jgit.diff.DiffEntry.Side.NEW;
 import static org.eclipse.jgit.diff.DiffEntry.Side.OLD;
+import static org.eclipse.jgit.storage.pack.PackConfig.DEFAULT_BIG_FILE_THRESHOLD;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -25,6 +26,7 @@
 import org.eclipse.jgit.internal.JGitText;
 import org.eclipse.jgit.lib.FileMode;
 import org.eclipse.jgit.lib.NullProgressMonitor;
+import org.eclipse.jgit.lib.ObjectLoader;
 import org.eclipse.jgit.lib.ProgressMonitor;
 
 class SimilarityRenameDetector {
@@ -80,6 +82,15 @@
 	/** Score a pair must exceed to be considered a rename. */
 	private int renameScore = 60;
 
+	/**
+	 * File size threshold (in bytes) for detecting renames. Files larger
+	 * than this size will not be processed for renames.
+	 */
+	private int bigFileThreshold = DEFAULT_BIG_FILE_THRESHOLD;
+
+	/** Skip content renames for binary files. */
+	private boolean skipBinaryFiles = false;
+
 	/** Set if any {@link SimilarityIndex.TableFullException} occurs. */
 	private boolean tableOverflow;
 
@@ -96,6 +107,14 @@
 		renameScore = score;
 	}
 
+	void setBigFileThreshold(int threshold) {
+		bigFileThreshold = threshold;
+	}
+
+	void setSkipBinaryFiles(boolean value) {
+		skipBinaryFiles = value;
+	}
+
 	void compute(ProgressMonitor pm) throws IOException, CancelledException {
 		if (pm == null)
 			pm = NullProgressMonitor.INSTANCE;
@@ -253,9 +272,19 @@
 					continue;
 				}
 
+				if (max > bigFileThreshold) {
+					pm.update(1);
+					continue;
+				}
+
 				if (s == null) {
 					try {
-						s = hash(OLD, srcEnt);
+						ObjectLoader loader = reader.open(OLD, srcEnt);
+						if (skipBinaryFiles && SimilarityIndex.isBinary(loader)) {
+							pm.update(1);
+							continue SRC;
+						}
+						s = hash(loader);
 					} catch (TableFullException tableFull) {
 						tableOverflow = true;
 						continue SRC;
@@ -264,7 +293,12 @@
 
 				SimilarityIndex d;
 				try {
-					d = hash(NEW, dstEnt);
+					ObjectLoader loader = reader.open(NEW, dstEnt);
+					if (skipBinaryFiles && SimilarityIndex.isBinary(loader)) {
+						pm.update(1);
+						continue;
+					}
+					d = hash(loader);
 				} catch (TableFullException tableFull) {
 					if (dstTooLarge == null)
 						dstTooLarge = new BitSet(dsts.size());
@@ -348,10 +382,10 @@
 		return (((dirScoreLtr + dirScoreRtl) * 25) + (fileScore * 50)) / 100;
 	}
 
-	private SimilarityIndex hash(DiffEntry.Side side, DiffEntry ent)
+	private SimilarityIndex hash(ObjectLoader objectLoader)
 			throws IOException, TableFullException {
 		SimilarityIndex r = new SimilarityIndex();
-		r.hash(reader.open(side, ent));
+		r.hash(objectLoader);
 		r.sort();
 		return r;
 	}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
index 671475e..c904a78 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
@@ -1610,11 +1610,9 @@
 		}
 		if (rc != 0) {
 			throw new IOException(new FilterFailedException(rc,
-					checkoutMetadata.smudgeFilterCommand,
-					path,
+					checkoutMetadata.smudgeFilterCommand, path,
 					result.getStdout().toByteArray(MAX_EXCEPTION_TEXT_SIZE),
-					RawParseUtils.decode(result.getStderr()
-							.toByteArray(MAX_EXCEPTION_TEXT_SIZE))));
+					result.getStderr().toString(MAX_EXCEPTION_TEXT_SIZE)));
 		}
 	}
 
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java
index c039aaf..552315d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java
@@ -12,6 +12,7 @@
 import static java.nio.charset.StandardCharsets.UTF_8;
 import static org.eclipse.jgit.lib.Constants.DEFAULT_REMOTE_NAME;
 import static org.eclipse.jgit.lib.Constants.R_REMOTES;
+import static org.eclipse.jgit.lib.Constants.R_TAGS;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -79,6 +80,13 @@
  * @since 3.4
  */
 public class RepoCommand extends GitCommand<RevCommit> {
+	private static final int LOCK_FAILURE_MAX_RETRIES = 5;
+
+	// Retry exponentially with delays in this range
+	private static final int LOCK_FAILURE_MIN_RETRY_DELAY_MILLIS = 50;
+
+	private static final int LOCK_FAILURE_MAX_RETRY_DELAY_MILLIS = 5000;
+
 	private String manifestPath;
 	private String baseUri;
 	private URI targetUri;
@@ -587,8 +595,11 @@
 							throw new RemoteUnavailableException(url);
 						}
 						if (recordRemoteBranch) {
-							// can be branch or tag
-							cfg.setString("submodule", name, "branch", //$NON-NLS-1$ //$NON-NLS-2$
+							// "branch" field is only for non-tag references.
+							// Keep tags in "ref" field as hint for other tools.
+							String field = proj.getRevision().startsWith(
+									R_TAGS) ? "ref" : "branch"; //$NON-NLS-1$ //$NON-NLS-2$
+							cfg.setString("submodule", name, field, //$NON-NLS-1$
 									proj.getRevision());
 						}
 
@@ -682,50 +693,22 @@
 				builder.finish();
 				ObjectId treeId = index.writeTree(inserter);
 
-				// Create a Commit object, populate it and write it
-				ObjectId headId = repo.resolve(targetBranch + "^{commit}"); //$NON-NLS-1$
-				if (headId != null && rw.parseCommit(headId).getTree().getId().equals(treeId)) {
-					// No change. Do nothing.
-					return rw.parseCommit(headId);
+				long prevDelay = 0;
+				for (int i = 0; i < LOCK_FAILURE_MAX_RETRIES - 1; i++) {
+					try {
+						return commitTreeOnCurrentTip(
+							inserter, rw, treeId);
+					} catch (ConcurrentRefUpdateException e) {
+						prevDelay = FileUtils.delay(prevDelay,
+								LOCK_FAILURE_MIN_RETRY_DELAY_MILLIS,
+								LOCK_FAILURE_MAX_RETRY_DELAY_MILLIS);
+						Thread.sleep(prevDelay);
+						repo.getRefDatabase().refresh();
+					}
 				}
-
-				CommitBuilder commit = new CommitBuilder();
-				commit.setTreeId(treeId);
-				if (headId != null)
-					commit.setParentIds(headId);
-				commit.setAuthor(author);
-				commit.setCommitter(author);
-				commit.setMessage(RepoText.get().repoCommitMessage);
-
-				ObjectId commitId = inserter.insert(commit);
-				inserter.flush();
-
-				RefUpdate ru = repo.updateRef(targetBranch);
-				ru.setNewObjectId(commitId);
-				ru.setExpectedOldObjectId(headId != null ? headId : ObjectId.zeroId());
-				Result rc = ru.update(rw);
-
-				switch (rc) {
-					case NEW:
-					case FORCED:
-					case FAST_FORWARD:
-						// Successful. Do nothing.
-						break;
-					case REJECTED:
-					case LOCK_FAILURE:
-						throw new ConcurrentRefUpdateException(
-								MessageFormat.format(
-										JGitText.get().cannotLock, targetBranch),
-								ru.getRef(),
-								rc);
-					default:
-						throw new JGitInternalException(MessageFormat.format(
-								JGitText.get().updatingRefFailed,
-								targetBranch, commitId.name(), rc));
-				}
-
-				return rw.parseCommit(commitId);
-			} catch (GitAPIException | IOException e) {
+				// In the last try, just propagate the exceptions
+				return commitTreeOnCurrentTip(inserter, rw, treeId);
+			} catch (GitAPIException | IOException | InterruptedException e) {
 				throw new ManifestErrorException(e);
 			}
 		}
@@ -742,6 +725,51 @@
 		}
 	}
 
+
+	private RevCommit commitTreeOnCurrentTip(ObjectInserter inserter,
+			RevWalk rw, ObjectId treeId)
+			throws IOException, ConcurrentRefUpdateException {
+		ObjectId headId = repo.resolve(targetBranch + "^{commit}"); //$NON-NLS-1$
+		if (headId != null && rw.parseCommit(headId).getTree().getId().equals(treeId)) {
+			// No change. Do nothing.
+			return rw.parseCommit(headId);
+		}
+
+		CommitBuilder commit = new CommitBuilder();
+		commit.setTreeId(treeId);
+		if (headId != null)
+			commit.setParentIds(headId);
+		commit.setAuthor(author);
+		commit.setCommitter(author);
+		commit.setMessage(RepoText.get().repoCommitMessage);
+
+		ObjectId commitId = inserter.insert(commit);
+		inserter.flush();
+
+		RefUpdate ru = repo.updateRef(targetBranch);
+		ru.setNewObjectId(commitId);
+		ru.setExpectedOldObjectId(headId != null ? headId : ObjectId.zeroId());
+		Result rc = ru.update(rw);
+		switch (rc) {
+			case NEW:
+			case FORCED:
+			case FAST_FORWARD:
+				// Successful. Do nothing.
+				break;
+			case REJECTED:
+			case LOCK_FAILURE:
+				throw new ConcurrentRefUpdateException(MessageFormat
+						.format(JGitText.get().cannotLock, targetBranch),
+						ru.getRef(), rc);
+			default:
+				throw new JGitInternalException(MessageFormat.format(
+						JGitText.get().updatingRefFailed,
+						targetBranch, commitId.name(), rc));
+		}
+
+		return rw.parseCommit(commitId);
+	}
+
 	private void addSubmodule(String name, String url, String path,
 			String revision, List<CopyFile> copyfiles, List<LinkFile> linkfiles,
 			Git git) throws GitAPIException, IOException {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
index b942c09..e1fa144 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
@@ -41,6 +41,9 @@
 	/***/ public String aNewObjectIdIsRequired;
 	/***/ public String anExceptionOccurredWhileTryingToAddTheIdOfHEAD;
 	/***/ public String anSSHSessionHasBeenAlreadyCreated;
+	/***/ public String applyBinaryBaseOidWrong;
+	/***/ public String applyBinaryOidTooShort;
+	/***/ public String applyBinaryResultOidWrong;
 	/***/ public String applyingCommit;
 	/***/ public String archiveFormatAlreadyAbsent;
 	/***/ public String archiveFormatAlreadyRegistered;
@@ -65,7 +68,19 @@
 	/***/ public String badSectionEntry;
 	/***/ public String badShallowLine;
 	/***/ public String bareRepositoryNoWorkdirAndIndex;
+	/***/ public String base85invalidChar;
+	/***/ public String base85length;
+	/***/ public String base85overflow;
+	/***/ public String base85tooLong;
+	/***/ public String base85tooShort;
 	/***/ public String baseLengthIncorrect;
+	/***/ public String binaryDeltaBaseLengthMismatch;
+	/***/ public String binaryDeltaInvalidOffset;
+	/***/ public String binaryDeltaInvalidResultLength;
+	/***/ public String binaryHunkDecodeError;
+	/***/ public String binaryHunkInvalidLength;
+	/***/ public String binaryHunkLineTooShort;
+	/***/ public String binaryHunkMissingNewline;
 	/***/ public String bitmapMissingObject;
 	/***/ public String bitmapsMustBePrepared;
 	/***/ public String blameNotCommittedYet;
@@ -167,6 +182,7 @@
 	/***/ public String connectionFailed;
 	/***/ public String connectionTimeOut;
 	/***/ public String contextMustBeNonNegative;
+	/***/ public String cookieFilePathRelative;
 	/***/ public String corruptionDetectedReReadingAt;
 	/***/ public String corruptObjectBadDate;
 	/***/ public String corruptObjectBadEmail;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
index 9ffff9f..40c075e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
@@ -344,10 +344,10 @@
 					&& repo.getFS()
 							.lastModifiedInstant(oldPack.getPackFile())
 							.toEpochMilli() < packExpireDate) {
-				oldPack.close();
 				if (shouldLoosen) {
 					loosen(inserter, reader, oldPack, ids);
 				}
+				oldPack.close();
 				prunePack(oldPack.getPackFile());
 			}
 		}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java
index c514270..6fbb4c5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2008, 2017, Google Inc.
- * Copyright (C) 2017, 2018, Thomas Wolf <thomas.wolf@paranor.ch> and others
+ * Copyright (C) 2017, 2021, Thomas Wolf <thomas.wolf@paranor.ch> and others
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Distribution License v. 1.0 which is available at
@@ -21,7 +21,8 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.LinkedHashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -82,12 +83,6 @@
  */
 public class OpenSshConfigFile implements SshConfigStore {
 
-	/**
-	 * "Host" name of the HostEntry for the default options before the first
-	 * host block in a config file.
-	 */
-	private static final String DEFAULT_NAME = ""; //$NON-NLS-1$
-
 	/** The user's home directory, as key files may be relative to here. */
 	private final File home;
 
@@ -105,11 +100,9 @@
 	 * fully resolved entries created from that.
 	 */
 	private static class State {
-		// Keyed by pattern; if a "Host" line has multiple patterns, we generate
-		// duplicate HostEntry objects
-		Map<String, HostEntry> entries = new LinkedHashMap<>();
+		List<HostEntry> entries = new LinkedList<>();
 
-		// Keyed by user@hostname:port
+		// Previous lookups, keyed by user@hostname:port
 		Map<String, HostEntry> hosts = new HashMap<>();
 
 		@Override
@@ -165,14 +158,16 @@
 			return h;
 		}
 		HostEntry fullConfig = new HostEntry();
-		// Initialize with default entries at the top of the file, before the
-		// first Host block.
-		fullConfig.merge(cache.entries.get(DEFAULT_NAME));
-		for (Map.Entry<String, HostEntry> e : cache.entries.entrySet()) {
-			String pattern = e.getKey();
-			if (isHostMatch(pattern, hostName)) {
-				fullConfig.merge(e.getValue());
-			}
+		Iterator<HostEntry> entries = cache.entries.iterator();
+		if (entries.hasNext()) {
+			// Should always have at least the first top entry containing
+			// key-value pairs before the first Host block
+			fullConfig.merge(entries.next());
+			entries.forEachRemaining(entry -> {
+				if (entry.matches(hostName)) {
+					fullConfig.merge(entry);
+				}
+			});
 		}
 		fullConfig.substitute(hostName, port, userName, localUserName, home);
 		cache.hosts.put(cacheKey, fullConfig);
@@ -208,20 +203,19 @@
 		return state;
 	}
 
-	private Map<String, HostEntry> parse(BufferedReader reader)
+	private List<HostEntry> parse(BufferedReader reader)
 			throws IOException {
-		final Map<String, HostEntry> entries = new LinkedHashMap<>();
-		final List<HostEntry> current = new ArrayList<>(4);
-		String line;
+		final List<HostEntry> entries = new LinkedList<>();
 
 		// The man page doesn't say so, but the openssh parser (readconf.c)
 		// starts out in active mode and thus always applies any lines that
 		// occur before the first host block. We gather those options in a
 		// HostEntry for DEFAULT_NAME.
 		HostEntry defaults = new HostEntry();
-		current.add(defaults);
-		entries.put(DEFAULT_NAME, defaults);
+		HostEntry current = defaults;
+		entries.add(defaults);
 
+		String line;
 		while ((line = reader.readLine()) != null) {
 			// OpenSsh ignores trailing comments on a line. Anything after the
 			// first # on a line is trimmed away (yes, even if the hash is
@@ -246,38 +240,17 @@
 			String argValue = parts.length > 1 ? parts[1].trim() : ""; //$NON-NLS-1$
 
 			if (StringUtils.equalsIgnoreCase(SshConstants.HOST, keyword)) {
-				current.clear();
-				for (String name : parseList(argValue)) {
-					if (name == null || name.isEmpty()) {
-						// null should not occur, but better be safe than sorry.
-						continue;
-					}
-					HostEntry c = entries.get(name);
-					if (c == null) {
-						c = new HostEntry();
-						entries.put(name, c);
-					}
-					current.add(c);
-				}
-				continue;
-			}
-
-			if (current.isEmpty()) {
-				// We received an option outside of a Host block. We
-				// don't know who this should match against, so skip.
+				current = new HostEntry(parseList(argValue));
+				entries.add(current);
 				continue;
 			}
 
 			if (HostEntry.isListKey(keyword)) {
 				List<String> args = validate(keyword, parseList(argValue));
-				for (HostEntry entry : current) {
-					entry.setValue(keyword, args);
-				}
+				current.setValue(keyword, args);
 			} else if (!argValue.isEmpty()) {
 				argValue = validate(keyword, dequote(argValue));
-				for (HostEntry entry : current) {
-					entry.setValue(keyword, argValue);
-				}
+				current.setValue(keyword, argValue);
 			}
 		}
 
@@ -300,7 +273,7 @@
 		int length = argument.length();
 		while (start < length) {
 			// Skip whitespace
-			if (Character.isSpaceChar(argument.charAt(start))) {
+			if (Character.isWhitespace(argument.charAt(start))) {
 				start++;
 				continue;
 			}
@@ -315,7 +288,7 @@
 			} else {
 				int stop = start + 1;
 				while (stop < length
-						&& !Character.isSpaceChar(argument.charAt(stop))) {
+						&& !Character.isWhitespace(argument.charAt(stop))) {
 					stop++;
 				}
 				result.add(argument.substring(start, stop));
@@ -358,13 +331,6 @@
 		return value;
 	}
 
-	private static boolean isHostMatch(String pattern, String name) {
-		if (pattern.startsWith("!")) { //$NON-NLS-1$
-			return !patternMatchesHost(pattern.substring(1), name);
-		}
-		return patternMatchesHost(pattern, name);
-	}
-
 	private static boolean patternMatchesHost(String pattern, String name) {
 		if (pattern.indexOf('*') >= 0 || pattern.indexOf('?') >= 0) {
 			final FileNameMatcher fn;
@@ -389,9 +355,12 @@
 
 	private static String stripWhitespace(String value) {
 		final StringBuilder b = new StringBuilder();
-		for (int i = 0; i < value.length(); i++) {
-			if (!Character.isSpaceChar(value.charAt(i)))
-				b.append(value.charAt(i));
+		int length = value.length();
+		for (int i = 0; i < length; i++) {
+			char ch = value.charAt(i);
+			if (!Character.isWhitespace(ch)) {
+				b.append(ch);
+			}
 		}
 		return b.toString();
 	}
@@ -511,6 +480,32 @@
 
 		private Map<String, List<String>> listOptions;
 
+		private final List<String> patterns;
+
+		// Constructor used to build the merged entry; never matches anything
+		HostEntry() {
+			this.patterns = Collections.emptyList();
+		}
+
+		HostEntry(List<String> patterns) {
+			this.patterns = patterns;
+		}
+
+		boolean matches(String hostName) {
+			boolean doesMatch = false;
+			for (String pattern : patterns) {
+				if (pattern.startsWith("!")) { //$NON-NLS-1$
+					if (patternMatchesHost(pattern.substring(1), hostName)) {
+						return false;
+					}
+				} else if (!doesMatch
+						&& patternMatchesHost(pattern, hostName)) {
+					doesMatch = true;
+				}
+			}
+			return doesMatch;
+		}
+
 		private static String toKey(String key) {
 			String k = ALIASES.get(key);
 			return k != null ? k : key;
@@ -708,10 +703,10 @@
 		}
 
 		private List<String> substitute(List<String> values, String allowed,
-				Replacer r) {
+				Replacer r, boolean withEnv) {
 			List<String> result = new ArrayList<>(values.size());
 			for (String value : values) {
-				result.add(r.substitute(value, allowed));
+				result.add(r.substitute(value, allowed, withEnv));
 			}
 			return result;
 		}
@@ -743,7 +738,7 @@
 				if (hostName == null || hostName.isEmpty()) {
 					options.put(SshConstants.HOST_NAME, originalHostName);
 				} else {
-					hostName = r.substitute(hostName, "h"); //$NON-NLS-1$
+					hostName = r.substitute(hostName, "h", false); //$NON-NLS-1$
 					options.put(SshConstants.HOST_NAME, hostName);
 					r.update('h', hostName);
 				}
@@ -752,13 +747,13 @@
 				List<String> values = multiOptions
 						.get(SshConstants.IDENTITY_FILE);
 				if (values != null) {
-					values = substitute(values, "dhlru", r); //$NON-NLS-1$
+					values = substitute(values, "dhlru", r, true); //$NON-NLS-1$
 					values = replaceTilde(values, home);
 					multiOptions.put(SshConstants.IDENTITY_FILE, values);
 				}
 				values = multiOptions.get(SshConstants.CERTIFICATE_FILE);
 				if (values != null) {
-					values = substitute(values, "dhlru", r); //$NON-NLS-1$
+					values = substitute(values, "dhlru", r, true); //$NON-NLS-1$
 					values = replaceTilde(values, home);
 					multiOptions.put(SshConstants.CERTIFICATE_FILE, values);
 				}
@@ -775,29 +770,29 @@
 				// HOSTNAME already done above
 				String value = options.get(SshConstants.IDENTITY_AGENT);
 				if (value != null) {
-					value = r.substitute(value, "dhlru"); //$NON-NLS-1$
+					value = r.substitute(value, "dhlru", true); //$NON-NLS-1$
 					value = toFile(value, home).getPath();
 					options.put(SshConstants.IDENTITY_AGENT, value);
 				}
 				value = options.get(SshConstants.CONTROL_PATH);
 				if (value != null) {
-					value = r.substitute(value, "ChLlnpru"); //$NON-NLS-1$
+					value = r.substitute(value, "ChLlnpru", true); //$NON-NLS-1$
 					value = toFile(value, home).getPath();
 					options.put(SshConstants.CONTROL_PATH, value);
 				}
 				value = options.get(SshConstants.LOCAL_COMMAND);
 				if (value != null) {
-					value = r.substitute(value, "CdhlnprTu"); //$NON-NLS-1$
+					value = r.substitute(value, "CdhlnprTu", false); //$NON-NLS-1$
 					options.put(SshConstants.LOCAL_COMMAND, value);
 				}
 				value = options.get(SshConstants.REMOTE_COMMAND);
 				if (value != null) {
-					value = r.substitute(value, "Cdhlnpru"); //$NON-NLS-1$
+					value = r.substitute(value, "Cdhlnpru", false); //$NON-NLS-1$
 					options.put(SshConstants.REMOTE_COMMAND, value);
 				}
 				value = options.get(SshConstants.PROXY_COMMAND);
 				if (value != null) {
-					value = r.substitute(value, "hpr"); //$NON-NLS-1$
+					value = r.substitute(value, "hpr", false); //$NON-NLS-1$
 					options.put(SshConstants.PROXY_COMMAND, value);
 				}
 			}
@@ -871,7 +866,7 @@
 			replacements.put(Character.valueOf('r'), user == null ? "" : user); //$NON-NLS-1$
 			replacements.put(Character.valueOf('u'), localUserName);
 			replacements.put(Character.valueOf('C'),
-					substitute("%l%h%p%r", "hlpr")); //$NON-NLS-1$ //$NON-NLS-2$
+					substitute("%l%h%p%r", "hlpr", false)); //$NON-NLS-1$ //$NON-NLS-2$
 			replacements.put(Character.valueOf('T'), "NONE"); //$NON-NLS-1$
 		}
 
@@ -879,36 +874,63 @@
 			replacements.put(Character.valueOf(key), value);
 			if ("lhpr".indexOf(key) >= 0) { //$NON-NLS-1$
 				replacements.put(Character.valueOf('C'),
-						substitute("%l%h%p%r", "hlpr")); //$NON-NLS-1$ //$NON-NLS-2$
+						substitute("%l%h%p%r", "hlpr", false)); //$NON-NLS-1$ //$NON-NLS-2$
 			}
 		}
 
-		public String substitute(String input, String allowed) {
+		public String substitute(String input, String allowed,
+				boolean withEnv) {
 			if (input == null || input.length() <= 1
-					|| input.indexOf('%') < 0) {
+					|| (input.indexOf('%') < 0
+							&& (!withEnv || input.indexOf("${") < 0))) { //$NON-NLS-1$
 				return input;
 			}
 			StringBuilder builder = new StringBuilder();
 			int start = 0;
 			int length = input.length();
 			while (start < length) {
-				int percent = input.indexOf('%', start);
-				if (percent < 0 || percent + 1 >= length) {
-					builder.append(input.substring(start));
+				char ch = input.charAt(start);
+				switch (ch) {
+				case '%':
+					if (start + 1 >= length) {
+						break;
+					}
+					String replacement = null;
+					ch = input.charAt(start + 1);
+					if (ch == '%' || allowed.indexOf(ch) >= 0) {
+						replacement = replacements.get(Character.valueOf(ch));
+					}
+					if (replacement == null) {
+						builder.append('%').append(ch);
+					} else {
+						builder.append(replacement);
+					}
+					start += 2;
+					continue;
+				case '$':
+					if (!withEnv || start + 2 >= length) {
+						break;
+					}
+					ch = input.charAt(start + 1);
+					if (ch == '{') {
+						int close = input.indexOf('}', start + 2);
+						if (close > start + 2) {
+							String variable = SystemReader.getInstance()
+									.getenv(input.substring(start + 2, close));
+							if (!StringUtils.isEmptyOrNull(variable)) {
+								builder.append(variable);
+							}
+							start = close + 1;
+							continue;
+						}
+					}
+					ch = '$';
+					break;
+				default:
 					break;
 				}
-				String replacement = null;
-				char ch = input.charAt(percent + 1);
-				if (ch == '%' || allowed.indexOf(ch) >= 0) {
-					replacement = replacements.get(Character.valueOf(ch));
-				}
-				if (replacement == null) {
-					builder.append(input.substring(start, percent + 2));
-				} else {
-					builder.append(input.substring(start, percent))
-							.append(replacement);
-				}
-				start = percent + 2;
+				builder.append(ch);
+				start++;
 			}
 			return builder.toString();
 		}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java
index 03c1ef9..3e3d9b5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java
@@ -398,7 +398,15 @@
 	public static final String CONFIG_KEY_FF = "ff";
 
 	/**
+	 * The "conflictStyle" key.
+	 *
+	 * @since 5.12
+	 */
+	public static final String CONFIG_KEY_CONFLICTSTYLE = "conflictStyle";
+
+	/**
 	 * The "checkstat" key
+	 *
 	 * @since 3.0
 	 */
 	public static final String CONFIG_KEY_CHECKSTAT = "checkstat";
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/ContentMergeStrategy.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/ContentMergeStrategy.java
new file mode 100644
index 0000000..6d56864
--- /dev/null
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/ContentMergeStrategy.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2021, Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.merge;
+
+/**
+ * How to handle content conflicts.
+ *
+ * @since 5.12
+ */
+public enum ContentMergeStrategy {
+
+	/** Produce a conflict. */
+	CONFLICT,
+
+	/** Resolve the conflict hunk using the ours version. */
+	OURS,
+
+	/** Resolve the conflict hunk using the theirs version. */
+	THEIRS
+}
\ No newline at end of file
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeAlgorithm.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeAlgorithm.java
index 27141c1..8060735 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeAlgorithm.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeAlgorithm.java
@@ -14,6 +14,7 @@
 import java.util.Iterator;
 import java.util.List;
 
+import org.eclipse.jgit.annotations.NonNull;
 import org.eclipse.jgit.diff.DiffAlgorithm;
 import org.eclipse.jgit.diff.Edit;
 import org.eclipse.jgit.diff.EditList;
@@ -28,8 +29,12 @@
  * diff algorithm.
  */
 public final class MergeAlgorithm {
+
 	private final DiffAlgorithm diffAlg;
 
+	@NonNull
+	private ContentMergeStrategy strategy = ContentMergeStrategy.CONFLICT;
+
 	/**
 	 * Creates a new MergeAlgorithm which uses
 	 * {@link org.eclipse.jgit.diff.HistogramDiff} as diff algorithm
@@ -48,6 +53,30 @@
 		this.diffAlg = diff;
 	}
 
+	/**
+	 * Retrieves the {@link ContentMergeStrategy}.
+	 *
+	 * @return the {@link ContentMergeStrategy} in effect
+	 * @since 5.12
+	 */
+	@NonNull
+	public ContentMergeStrategy getContentMergeStrategy() {
+		return strategy;
+	}
+
+	/**
+	 * Sets the {@link ContentMergeStrategy}.
+	 *
+	 * @param strategy
+	 *            {@link ContentMergeStrategy} to set; if {@code null}, set
+	 *            {@link ContentMergeStrategy#CONFLICT}
+	 * @since 5.12
+	 */
+	public void setContentMergeStrategy(ContentMergeStrategy strategy) {
+		this.strategy = strategy == null ? ContentMergeStrategy.CONFLICT
+				: strategy;
+	}
+
 	// An special edit which acts as a sentinel value by marking the end the
 	// list of edits
 	private static final Edit END_EDIT = new Edit(Integer.MAX_VALUE,
@@ -79,29 +108,54 @@
 			if (theirs.size() != 0) {
 				EditList theirsEdits = diffAlg.diff(cmp, base, theirs);
 				if (!theirsEdits.isEmpty()) {
-					// we deleted, they modified -> Let their complete content
-					// conflict with empty text
-					result.add(1, 0, 0, ConflictState.FIRST_CONFLICTING_RANGE);
-					result.add(2, 0, theirs.size(),
-							ConflictState.NEXT_CONFLICTING_RANGE);
-				} else
+					// we deleted, they modified
+					switch (strategy) {
+					case OURS:
+						result.add(1, 0, 0, ConflictState.NO_CONFLICT);
+						break;
+					case THEIRS:
+						result.add(2, 0, theirs.size(),
+								ConflictState.NO_CONFLICT);
+						break;
+					default:
+						// Let their complete content conflict with empty text
+						result.add(1, 0, 0,
+								ConflictState.FIRST_CONFLICTING_RANGE);
+						result.add(2, 0, theirs.size(),
+								ConflictState.NEXT_CONFLICTING_RANGE);
+						break;
+					}
+				} else {
 					// we deleted, they didn't modify -> Let our deletion win
 					result.add(1, 0, 0, ConflictState.NO_CONFLICT);
-			} else
+				}
+			} else {
 				// we and they deleted -> return a single chunk of nothing
 				result.add(1, 0, 0, ConflictState.NO_CONFLICT);
+			}
 			return result;
 		} else if (theirs.size() == 0) {
 			EditList oursEdits = diffAlg.diff(cmp, base, ours);
 			if (!oursEdits.isEmpty()) {
-				// we modified, they deleted -> Let our complete content
-				// conflict with empty text
-				result.add(1, 0, ours.size(),
-						ConflictState.FIRST_CONFLICTING_RANGE);
-				result.add(2, 0, 0, ConflictState.NEXT_CONFLICTING_RANGE);
-			} else
+				// we modified, they deleted
+				switch (strategy) {
+				case OURS:
+					result.add(1, 0, ours.size(), ConflictState.NO_CONFLICT);
+					break;
+				case THEIRS:
+					result.add(2, 0, 0, ConflictState.NO_CONFLICT);
+					break;
+				default:
+					// Let our complete content conflict with empty text
+					result.add(1, 0, ours.size(),
+							ConflictState.FIRST_CONFLICTING_RANGE);
+					result.add(2, 0, 0, ConflictState.NEXT_CONFLICTING_RANGE);
+					break;
+				}
+			} else {
 				// they deleted, we didn't modify -> Let their deletion win
 				result.add(2, 0, 0, ConflictState.NO_CONFLICT);
+			}
 			return result;
 		}
 
@@ -249,12 +303,26 @@
 
 				// Add the conflict (Only if there is a conflict left to report)
 				if (minBSize > 0 || BSizeDelta != 0) {
-					result.add(1, oursBeginB + commonPrefix, oursEndB
-							- commonSuffix,
-							ConflictState.FIRST_CONFLICTING_RANGE);
-					result.add(2, theirsBeginB + commonPrefix, theirsEndB
-							- commonSuffix,
-							ConflictState.NEXT_CONFLICTING_RANGE);
+					switch (strategy) {
+					case OURS:
+						result.add(1, oursBeginB + commonPrefix,
+								oursEndB - commonSuffix,
+								ConflictState.NO_CONFLICT);
+						break;
+					case THEIRS:
+						result.add(2, theirsBeginB + commonPrefix,
+								theirsEndB - commonSuffix,
+								ConflictState.NO_CONFLICT);
+						break;
+					default:
+						result.add(1, oursBeginB + commonPrefix,
+								oursEndB - commonSuffix,
+								ConflictState.FIRST_CONFLICTING_RANGE);
+						result.add(2, theirsBeginB + commonPrefix,
+								theirsEndB - commonSuffix,
+								ConflictState.NEXT_CONFLICTING_RANGE);
+						break;
+					}
 				}
 
 				// Add the common lines at end of conflict
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java
index 4bfb38d..7767662 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java
@@ -37,6 +37,7 @@
 import java.util.List;
 import java.util.Map;
 
+import org.eclipse.jgit.annotations.NonNull;
 import org.eclipse.jgit.attributes.Attributes;
 import org.eclipse.jgit.diff.DiffAlgorithm;
 import org.eclipse.jgit.diff.DiffAlgorithm.SupportedAlgorithm;
@@ -268,6 +269,13 @@
 	private int inCoreLimit;
 
 	/**
+	 * The {@link ContentMergeStrategy} to use for "resolve" and "recursive"
+	 * merges.
+	 */
+	@NonNull
+	private ContentMergeStrategy contentStrategy = ContentMergeStrategy.CONFLICT;
+
+	/**
 	 * Keeps {@link CheckoutMetadata} for {@link #checkout()} and
 	 * {@link #cleanUp()}.
 	 */
@@ -344,6 +352,29 @@
 		dircache = DirCache.newInCore();
 	}
 
+	/**
+	 * Retrieves the content merge strategy for content conflicts.
+	 *
+	 * @return the {@link ContentMergeStrategy} in effect
+	 * @since 5.12
+	 */
+	@NonNull
+	public ContentMergeStrategy getContentMergeStrategy() {
+		return contentStrategy;
+	}
+
+	/**
+	 * Sets the content merge strategy for content conflicts.
+	 *
+	 * @param strategy
+	 *            {@link ContentMergeStrategy} to use
+	 * @since 5.12
+	 */
+	public void setContentMergeStrategy(ContentMergeStrategy strategy) {
+		contentStrategy = strategy == null ? ContentMergeStrategy.CONFLICT
+				: strategy;
+	}
+
 	/** {@inheritDoc} */
 	@Override
 	protected boolean mergeImpl() throws IOException {
@@ -644,15 +675,19 @@
 				}
 				return true;
 			}
-			// FileModes are not mergeable. We found a conflict on modes.
-			// For conflicting entries we don't know lastModified and
-			// length.
-			add(tw.getRawPath(), base, DirCacheEntry.STAGE_1, EPOCH, 0);
-			add(tw.getRawPath(), ours, DirCacheEntry.STAGE_2, EPOCH, 0);
-			add(tw.getRawPath(), theirs, DirCacheEntry.STAGE_3, EPOCH, 0);
-			unmergedPaths.add(tw.getPathString());
-			mergeResults.put(tw.getPathString(),
-					new MergeResult<>(Collections.<RawText> emptyList()));
+			if (!ignoreConflicts) {
+				// FileModes are not mergeable. We found a conflict on modes.
+				// For conflicting entries we don't know lastModified and
+				// length.
+				// This path can be skipped on ignoreConflicts, so the caller
+				// could use virtual commit.
+				add(tw.getRawPath(), base, DirCacheEntry.STAGE_1, EPOCH, 0);
+				add(tw.getRawPath(), ours, DirCacheEntry.STAGE_2, EPOCH, 0);
+				add(tw.getRawPath(), theirs, DirCacheEntry.STAGE_3, EPOCH, 0);
+				unmergedPaths.add(tw.getPathString());
+				mergeResults.put(tw.getPathString(),
+						new MergeResult<>(Collections.emptyList()));
+			}
 			return true;
 		}
 
@@ -757,6 +792,19 @@
 				unmergedPaths.add(tw.getPathString());
 				return true;
 			} else if (!attributes.canBeContentMerged()) {
+				// File marked as binary
+				switch (getContentMergeStrategy()) {
+				case OURS:
+					keep(ourDce);
+					return true;
+				case THEIRS:
+					DirCacheEntry theirEntry = add(tw.getRawPath(), theirs,
+							DirCacheEntry.STAGE_0, EPOCH, 0);
+					addToCheckout(tw.getPathString(), theirEntry, attributes);
+					return true;
+				default:
+					break;
+				}
 				add(tw.getRawPath(), base, DirCacheEntry.STAGE_1, EPOCH, 0);
 				add(tw.getRawPath(), ours, DirCacheEntry.STAGE_2, EPOCH, 0);
 				add(tw.getRawPath(), theirs, DirCacheEntry.STAGE_3, EPOCH, 0);
@@ -771,8 +819,26 @@
 				return false;
 			}
 
-			MergeResult<RawText> result = contentMerge(base, ours, theirs,
-					attributes);
+			MergeResult<RawText> result = null;
+			try {
+				result = contentMerge(base, ours, theirs, attributes,
+						getContentMergeStrategy());
+			} catch (BinaryBlobException e) {
+				switch (getContentMergeStrategy()) {
+				case OURS:
+					keep(ourDce);
+					return true;
+				case THEIRS:
+					DirCacheEntry theirEntry = add(tw.getRawPath(), theirs,
+							DirCacheEntry.STAGE_0, EPOCH, 0);
+					addToCheckout(tw.getPathString(), theirEntry, attributes);
+					return true;
+				default:
+					result = new MergeResult<>(Collections.emptyList());
+					result.setContainsConflicts(true);
+					break;
+				}
+			}
 			if (ignoreConflicts) {
 				result.setContainsConflicts(false);
 			}
@@ -799,9 +865,16 @@
 					mergeResults.put(tw.getPathString(), result);
 					unmergedPaths.add(tw.getPathString());
 				} else {
-					MergeResult<RawText> result = contentMerge(base, ours,
-							theirs, attributes);
-
+					// Content merge strategy does not apply to delete-modify
+					// conflicts!
+					MergeResult<RawText> result;
+					try {
+						result = contentMerge(base, ours, theirs, attributes,
+								ContentMergeStrategy.CONFLICT);
+					} catch (BinaryBlobException e) {
+						result = new MergeResult<>(Collections.emptyList());
+						result.setContainsConflicts(true);
+					}
 					if (ignoreConflicts) {
 						// In case a conflict is detected the working tree file
 						// is again filled with new content (containing conflict
@@ -863,32 +936,26 @@
 	 * @param ours
 	 * @param theirs
 	 * @param attributes
+	 * @param strategy
 	 *
 	 * @return the result of the content merge
+	 * @throws BinaryBlobException
+	 *             if any of the blobs looks like a binary blob
 	 * @throws IOException
 	 */
 	private MergeResult<RawText> contentMerge(CanonicalTreeParser base,
 			CanonicalTreeParser ours, CanonicalTreeParser theirs,
-			Attributes attributes)
-			throws IOException {
-		RawText baseText;
-		RawText ourText;
-		RawText theirsText;
-
-		try {
-			baseText = base == null ? RawText.EMPTY_TEXT : getRawText(
-							base.getEntryObjectId(), attributes);
-			ourText = ours == null ? RawText.EMPTY_TEXT : getRawText(
-							ours.getEntryObjectId(), attributes);
-			theirsText = theirs == null ? RawText.EMPTY_TEXT : getRawText(
-							theirs.getEntryObjectId(), attributes);
-		} catch (BinaryBlobException e) {
-			MergeResult<RawText> r = new MergeResult<>(Collections.<RawText>emptyList());
-			r.setContainsConflicts(true);
-			return r;
-		}
-		return (mergeAlgorithm.merge(RawTextComparator.DEFAULT, baseText,
-				ourText, theirsText));
+			Attributes attributes, ContentMergeStrategy strategy)
+			throws BinaryBlobException, IOException {
+		RawText baseText = base == null ? RawText.EMPTY_TEXT
+				: getRawText(base.getEntryObjectId(), attributes);
+		RawText ourText = ours == null ? RawText.EMPTY_TEXT
+				: getRawText(ours.getEntryObjectId(), attributes);
+		RawText theirsText = theirs == null ? RawText.EMPTY_TEXT
+				: getRawText(theirs.getEntryObjectId(), attributes);
+		mergeAlgorithm.setContentMergeStrategy(strategy);
+		return mergeAlgorithm.merge(RawTextComparator.DEFAULT, baseText,
+				ourText, theirsText);
 	}
 
 	private boolean isIndexDirty() {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java
index 631d861..5d5ba12 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java
@@ -32,10 +32,13 @@
 import org.eclipse.jgit.lib.AsyncObjectLoaderQueue;
 import org.eclipse.jgit.lib.Constants;
 import org.eclipse.jgit.lib.MutableObjectId;
+import org.eclipse.jgit.lib.NullProgressMonitor;
 import org.eclipse.jgit.lib.ObjectId;
 import org.eclipse.jgit.lib.ObjectIdOwnerMap;
 import org.eclipse.jgit.lib.ObjectLoader;
 import org.eclipse.jgit.lib.ObjectReader;
+import org.eclipse.jgit.lib.ProgressMonitor;
+import org.eclipse.jgit.lib.Ref;
 import org.eclipse.jgit.lib.Repository;
 import org.eclipse.jgit.revwalk.filter.RevFilter;
 import org.eclipse.jgit.treewalk.filter.TreeFilter;
@@ -181,6 +184,12 @@
 
 	boolean shallowCommitsInitialized;
 
+	private enum GetMergedIntoStrategy {
+		RETURN_ON_FIRST_FOUND,
+		RETURN_ON_FIRST_NOT_FOUND,
+		EVALUATE_ALL
+	}
+
 	/**
 	 * Create a new revision walker for a given repository.
 	 *
@@ -425,6 +434,145 @@
 	}
 
 	/**
+	 * Determine the Refs into which a commit is merged.
+	 * <p>
+	 * A commit is merged into a ref if we can find a path of commits that leads
+	 * from that specific ref and ends at <code>commit</code>.
+	 * <p>
+	 *
+	 * @param commit
+	 *            commit the caller thinks is reachable from <code>refs</code>.
+	 * @param refs
+	 *            refs to start iteration from, and which is most likely a
+	 *            descendant (child) of <code>commit</code>.
+	 * @return list of refs that are reachable from <code>commit</code>.
+	 * @throws java.io.IOException
+	 *             a pack file or loose object could not be read.
+	 * @since 5.12
+	 */
+	public List<Ref> getMergedInto(RevCommit commit, Collection<Ref> refs)
+			throws IOException{
+		return getMergedInto(commit, refs, NullProgressMonitor.INSTANCE);
+	}
+
+	/**
+	 * Determine the Refs into which a commit is merged.
+	 * <p>
+	 * A commit is merged into a ref if we can find a path of commits that leads
+	 * from that specific ref and ends at <code>commit</code>.
+	 * <p>
+	 *
+	 * @param commit
+	 *            commit the caller thinks is reachable from <code>refs</code>.
+	 * @param refs
+	 *            refs to start iteration from, and which is most likely a
+	 *            descendant (child) of <code>commit</code>.
+	 * @param monitor
+	 *            the callback for progress and cancellation
+	 * @return list of refs that are reachable from <code>commit</code>.
+	 * @throws java.io.IOException
+	 *             a pack file or loose object could not be read.
+	 * @since 5.12
+	 */
+	public List<Ref> getMergedInto(RevCommit commit, Collection<Ref> refs,
+					ProgressMonitor monitor) throws IOException{
+		return getMergedInto(commit, refs,
+				GetMergedIntoStrategy.EVALUATE_ALL,
+				monitor);
+	}
+
+	/**
+	 * Determine if a <code>commit</code> is merged into any of the given
+	 * <code>refs</code>.
+	 *
+	 * @param commit
+	 *            commit the caller thinks is reachable from <code>refs</code>.
+	 * @param refs
+	 *            refs to start iteration from, and which is most likely a
+	 *            descendant (child) of <code>commit</code>.
+	 * @return true if commit is merged into any of the refs; false otherwise.
+	 * @throws java.io.IOException
+	 *             a pack file or loose object could not be read.
+	 * @since 5.12
+	 */
+	public boolean isMergedIntoAny(RevCommit commit, Collection<Ref> refs)
+			throws IOException {
+		return getMergedInto(commit, refs,
+				GetMergedIntoStrategy.RETURN_ON_FIRST_FOUND,
+				NullProgressMonitor.INSTANCE).size() > 0;
+	}
+
+	/**
+	 * Determine if a <code>commit</code> is merged into all of the given
+	 * <code>refs</code>.
+	 *
+	 * @param commit
+	 *            commit the caller thinks is reachable from <code>refs</code>.
+	 * @param refs
+	 *            refs to start iteration from, and which is most likely a
+	 *            descendant (child) of <code>commit</code>.
+	 * @return true if commit is merged into all of the refs; false otherwise.
+	 * @throws java.io.IOException
+	 *             a pack file or loose object could not be read.
+	 * @since 5.12
+	 */
+	public boolean isMergedIntoAll(RevCommit commit, Collection<Ref> refs)
+			throws IOException {
+		return getMergedInto(commit, refs,
+				GetMergedIntoStrategy.RETURN_ON_FIRST_NOT_FOUND,
+				NullProgressMonitor.INSTANCE).size()
+				== refs.size();
+	}
+
+	private List<Ref> getMergedInto(RevCommit needle, Collection<Ref> haystacks,
+				Enum returnStrategy, ProgressMonitor monitor) throws IOException {
+		List<Ref> result = new ArrayList<>();
+		RevFilter oldRF = filter;
+		TreeFilter oldTF = treeFilter;
+		try {
+			finishDelayedFreeFlags();
+			filter = RevFilter.ALL;
+			treeFilter = TreeFilter.ALL;
+			for (Ref r: haystacks) {
+				if (monitor.isCancelled()) {
+					return result;
+				}
+				monitor.update(1);
+				RevObject o = parseAny(r.getObjectId());
+				if (!(o instanceof RevCommit)) {
+					continue;
+				}
+				RevCommit c = (RevCommit) o;
+				resetRetain(RevFlag.UNINTERESTING);
+				markStart(c);
+				boolean commitFound = false;
+				RevCommit next;
+				while ((next = next()) != null) {
+					if (References.isSameObject(next, needle)) {
+						result.add(r);
+						if (returnStrategy == GetMergedIntoStrategy.RETURN_ON_FIRST_FOUND) {
+							return result;
+						}
+						commitFound = true;
+						break;
+					}
+				}
+				if(!commitFound){
+					markUninteresting(c);
+					if (returnStrategy == GetMergedIntoStrategy.RETURN_ON_FIRST_NOT_FOUND) {
+						return result;
+					}
+				}
+			}
+		} finally {
+			reset(~freeFlags & APP_FLAGS);
+			filter = oldRF;
+			treeFilter = oldTF;
+		}
+		return result;
+	}
+
+	/**
 	 * Pop the next most recent commit.
 	 *
 	 * @return next most recent commit; null if traversal is over.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalkUtils.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalkUtils.java
index 3feb9c5..e52e916 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalkUtils.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalkUtils.java
@@ -159,15 +159,12 @@
 		// Make sure commit is from the same RevWalk
 		commit = revWalk.parseCommit(commit.getId());
 		revWalk.reset();
-		List<Ref> result = new ArrayList<>();
+		List<Ref> filteredRefs = new ArrayList<>();
 		monitor.beginTask(JGitText.get().searchForReachableBranches,
 				refs.size());
 		final int SKEW = 24*3600; // one day clock skew
 
 		for (Ref ref : refs) {
-			if (monitor.isCancelled())
-				return result;
-			monitor.update(1);
 			RevObject maybehead = revWalk.parseAny(ref.getObjectId());
 			if (!(maybehead instanceof RevCommit))
 				continue;
@@ -179,9 +176,9 @@
 			if (headCommit.getCommitTime() + SKEW < commit.getCommitTime())
 				continue;
 
-			if (revWalk.isMergedInto(commit, headCommit))
-				result.add(ref);
+			filteredRefs.add(ref);
 		}
+		List<Ref> result = revWalk.getMergedInto(commit, filteredRefs, monitor);
 		monitor.endTask();
 		return result;
 	}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConstants.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConstants.java
index be55cd1..5cd5b33 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConstants.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConstants.java
@@ -118,7 +118,7 @@
 	 * Key in an ssh config file; defines signature algorithms for public key
 	 * authentication as a comma-separated list.
 	 *
-	 * @since 5.11
+	 * @since 5.11.1
 	 */
 	public static final String PUBKEY_ACCEPTED_ALGORITHMS = "PubkeyAcceptedAlgorithms";
 
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
index 2e5d18d..0710d3f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
@@ -35,6 +35,7 @@
 
 import java.io.BufferedInputStream;
 import java.io.BufferedReader;
+import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
@@ -53,8 +54,6 @@
 import java.net.URLDecoder;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.InvalidPathException;
-import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.security.GeneralSecurityException;
 import java.security.cert.CertPathBuilderException;
 import java.security.cert.CertPathValidatorException;
@@ -101,6 +100,7 @@
 import org.eclipse.jgit.transport.http.HttpConnection;
 import org.eclipse.jgit.transport.http.HttpConnectionFactory;
 import org.eclipse.jgit.transport.http.HttpConnectionFactory2;
+import org.eclipse.jgit.util.FS;
 import org.eclipse.jgit.util.HttpSupport;
 import org.eclipse.jgit.util.IO;
 import org.eclipse.jgit.util.RawParseUtils;
@@ -1157,17 +1157,28 @@
 		return new TransportException(uri, why);
 	}
 
-	private static NetscapeCookieFile getCookieFileFromConfig(
+	private NetscapeCookieFile getCookieFileFromConfig(
 			HttpConfig config) {
-		if (!StringUtils.isEmptyOrNull(config.getCookieFile())) {
+		String path = config.getCookieFile();
+		if (!StringUtils.isEmptyOrNull(path)) {
 			try {
-				Path cookieFilePath = Paths.get(config.getCookieFile());
+				FS fs = local != null ? local.getFS() : FS.DETECTED;
+				File f;
+				if (path.startsWith("~/")) { //$NON-NLS-1$
+					f = fs.resolve(fs.userHome(), path.substring(2));
+				} else {
+					f = new File(path);
+					if (!f.isAbsolute()) {
+						f = fs.resolve(null, path);
+						LOG.warn(MessageFormat.format(
+								JGitText.get().cookieFilePathRelative, f));
+					}
+				}
 				return NetscapeCookieFileCache.getInstance(config)
-						.getEntry(cookieFilePath);
+						.getEntry(f.toPath());
 			} catch (InvalidPathException e) {
 				LOG.warn(MessageFormat.format(
-						JGitText.get().couldNotReadCookieFile,
-						config.getCookieFile()), e);
+						JGitText.get().couldNotReadCookieFile, path), e);
 			}
 		}
 		return null;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UsernamePasswordCredentialsProvider.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UsernamePasswordCredentialsProvider.java
index 979961f..c0de42c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UsernamePasswordCredentialsProvider.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UsernamePasswordCredentialsProvider.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010, Google Inc. and others
+ * Copyright (C) 2010, 2021 Google Inc. and others
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Distribution License v. 1.0 which is available at
@@ -58,14 +58,21 @@
 	@Override
 	public boolean supports(CredentialItem... items) {
 		for (CredentialItem i : items) {
-			if (i instanceof CredentialItem.Username)
+			if (i instanceof CredentialItem.InformationalMessage) {
 				continue;
-
-			else if (i instanceof CredentialItem.Password)
+			}
+			if (i instanceof CredentialItem.Username) {
 				continue;
-
-			else
-				return false;
+			}
+			if (i instanceof CredentialItem.Password) {
+				continue;
+			}
+			if (i instanceof CredentialItem.StringType) {
+				if (i.getPromptText().equals("Password: ")) { //$NON-NLS-1$
+					continue;
+				}
+			}
+			return false;
 		}
 		return true;
 	}
@@ -75,6 +82,9 @@
 	public boolean get(URIish uri, CredentialItem... items)
 			throws UnsupportedCredentialItem {
 		for (CredentialItem i : items) {
+			if (i instanceof CredentialItem.InformationalMessage) {
+				continue;
+			}
 			if (i instanceof CredentialItem.Username) {
 				((CredentialItem.Username) i).setValue(username);
 				continue;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java
index 55b7d62..0b7c0a9 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java
@@ -502,8 +502,7 @@
 				throw new IOException(new FilterFailedException(rc,
 						filterCommand, getEntryPathString(),
 						result.getStdout().toByteArray(MAX_EXCEPTION_TEXT_SIZE),
-						RawParseUtils.decode(result.getStderr()
-								.toByteArray(MAX_EXCEPTION_TEXT_SIZE))));
+						result.getStderr().toString(MAX_EXCEPTION_TEXT_SIZE)));
 			}
 			return result.getStdout().openInputStreamWithAutoDestroy();
 		}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/Base85.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/Base85.java
new file mode 100644
index 0000000..54b7cfc
--- /dev/null
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/Base85.java
@@ -0,0 +1,195 @@
+/*
+ * Copyright (C) 2021 Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.util;
+
+import java.nio.charset.StandardCharsets;
+import java.text.MessageFormat;
+import java.util.Arrays;
+
+import org.eclipse.jgit.internal.JGitText;
+
+/**
+ * Base-85 encoder/decoder.
+ *
+ * @since 5.12
+ */
+public final class Base85 {
+
+	private static final byte[] ENCODE = ("0123456789" //$NON-NLS-1$
+			+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ" //$NON-NLS-1$
+			+ "abcdefghijklmnopqrstuvwxyz" //$NON-NLS-1$
+			+ "!#$%&()*+-;<=>?@^_`{|}~") //$NON-NLS-1$
+					.getBytes(StandardCharsets.US_ASCII);
+
+	private static final int[] DECODE = new int[256];
+
+	static {
+		Arrays.fill(DECODE, -1);
+		for (int i = 0; i < ENCODE.length; i++) {
+			DECODE[ENCODE[i]] = i;
+		}
+	}
+
+	private Base85() {
+		// No instantiation
+	}
+
+	/**
+	 * Determines the length of the base-85 encoding for {@code rawLength}
+	 * bytes.
+	 *
+	 * @param rawLength
+	 *            number of bytes to encode
+	 * @return number of bytes needed for the base-85 encoding of
+	 *         {@code rawLength} bytes
+	 */
+	public static int encodedLength(int rawLength) {
+		return (rawLength + 3) / 4 * 5;
+	}
+
+	/**
+	 * Encodes the given {@code data} in Base-85.
+	 *
+	 * @param data
+	 *            to encode
+	 * @return encoded data
+	 */
+	public static byte[] encode(byte[] data) {
+		return encode(data, 0, data.length);
+	}
+
+	/**
+	 * Encodes {@code length} bytes of {@code data} in Base-85, beginning at the
+	 * {@code start} index.
+	 *
+	 * @param data
+	 *            to encode
+	 * @param start
+	 *            index of the first byte to encode
+	 * @param length
+	 *            number of bytes to encode
+	 * @return encoded data
+	 */
+	public static byte[] encode(byte[] data, int start, int length) {
+		byte[] result = new byte[encodedLength(length)];
+		int end = start + length;
+		int in = start;
+		int out = 0;
+		while (in < end) {
+			// Accumulate remaining bytes MSB first as a 32bit value
+			long accumulator = ((long) (data[in++] & 0xFF)) << 24;
+			if (in < end) {
+				accumulator |= (data[in++] & 0xFF) << 16;
+				if (in < end) {
+					accumulator |= (data[in++] & 0xFF) << 8;
+					if (in < end) {
+						accumulator |= (data[in++] & 0xFF);
+					}
+				}
+			}
+			// Write the 32bit value in base-85 encoding, also MSB first
+			for (int i = 4; i >= 0; i--) {
+				result[out + i] = ENCODE[(int) (accumulator % 85)];
+				accumulator /= 85;
+			}
+			out += 5;
+		}
+		return result;
+	}
+
+	/**
+	 * Decodes the Base-85 {@code encoded} data into a byte array of
+	 * {@code expectedSize} bytes.
+	 *
+	 * @param encoded
+	 *            Base-85 encoded data
+	 * @param expectedSize
+	 *            of the result
+	 * @return the decoded bytes
+	 * @throws IllegalArgumentException
+	 *             if expectedSize doesn't match, the encoded data has a length
+	 *             that is not a multiple of 5, or there are invalid characters
+	 *             in the encoded data
+	 */
+	public static byte[] decode(byte[] encoded, int expectedSize) {
+		return decode(encoded, 0, encoded.length, expectedSize);
+	}
+
+	/**
+	 * Decodes {@code length} bytes of Base-85 {@code encoded} data, beginning
+	 * at the {@code start} index, into a byte array of {@code expectedSize}
+	 * bytes.
+	 *
+	 * @param encoded
+	 *            Base-85 encoded data
+	 * @param start
+	 *            index at which the data to decode starts in {@code encoded}
+	 * @param length
+	 *            of the Base-85 encoded data
+	 * @param expectedSize
+	 *            of the result
+	 * @return the decoded bytes
+	 * @throws IllegalArgumentException
+	 *             if expectedSize doesn't match, {@code length} is not a
+	 *             multiple of 5, or there are invalid characters in the encoded
+	 *             data
+	 */
+	public static byte[] decode(byte[] encoded, int start, int length,
+			int expectedSize) {
+		if (length % 5 != 0) {
+			throw new IllegalArgumentException(JGitText.get().base85length);
+		}
+		byte[] result = new byte[expectedSize];
+		int end = start + length;
+		int in = start;
+		int out = 0;
+		while (in < end && out < expectedSize) {
+			// Accumulate 5 bytes, "MSB" first
+			long accumulator = 0;
+			for (int i = 4; i >= 0; i--) {
+				int val = DECODE[encoded[in++] & 0xFF];
+				if (val < 0) {
+					throw new IllegalArgumentException(MessageFormat.format(
+							JGitText.get().base85invalidChar,
+							Integer.toHexString(encoded[in - 1] & 0xFF)));
+				}
+				accumulator = accumulator * 85 + val;
+			}
+			if (accumulator > 0xFFFF_FFFFL) {
+				throw new IllegalArgumentException(
+						MessageFormat.format(JGitText.get().base85overflow,
+								Long.toHexString(accumulator)));
+			}
+			// Write remaining bytes, MSB first
+			result[out++] = (byte) (accumulator >>> 24);
+			if (out < expectedSize) {
+				result[out++] = (byte) (accumulator >>> 16);
+				if (out < expectedSize) {
+					result[out++] = (byte) (accumulator >>> 8);
+					if (out < expectedSize) {
+						result[out++] = (byte) accumulator;
+					}
+				}
+			}
+		}
+		// Should have exhausted 'in' and filled 'out' completely
+		if (in < end) {
+			throw new IllegalArgumentException(
+					MessageFormat.format(JGitText.get().base85tooLong,
+							Integer.valueOf(expectedSize)));
+		}
+		if (out < expectedSize) {
+			throw new IllegalArgumentException(
+					MessageFormat.format(JGitText.get().base85tooShort,
+							Integer.valueOf(expectedSize)));
+		}
+		return result;
+	}
+}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java
index 562eb05..fb893a6 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java
@@ -18,6 +18,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.io.UncheckedIOException;
 import java.util.ArrayList;
 
 import org.eclipse.jgit.internal.JGitText;
@@ -213,6 +214,24 @@
 	}
 
 	/**
+	 * Convert first {@code limit} number of bytes of the buffer content to
+	 * String.
+	 *
+	 * @param limit
+	 *            the maximum number of bytes to be converted to String
+	 * @return first {@code limit} number of bytes of the buffer content
+	 *         converted to String.
+	 * @since 5.12
+	 */
+	public String toString(int limit) {
+		try {
+			return RawParseUtils.decode(toByteArray(limit));
+		} catch (IOException e) {
+			throw new UncheckedIOException(e);
+		}
+	}
+
+	/**
 	 * Convert this buffer's contents into a contiguous byte array. If this size
 	 * of the buffer exceeds the limit only return the first {@code limit} bytes
 	 * <p>
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/BinaryDeltaInputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/BinaryDeltaInputStream.java
new file mode 100644
index 0000000..9eceeb8
--- /dev/null
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/BinaryDeltaInputStream.java
@@ -0,0 +1,211 @@
+/*
+ * Copyright (C) 2021 Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.util.io;
+
+import java.io.EOFException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StreamCorruptedException;
+import java.text.MessageFormat;
+
+import org.eclipse.jgit.internal.JGitText;
+
+/**
+ * An {@link InputStream} that applies a binary delta to a base on the fly.
+ * <p>
+ * Delta application to a base needs random access to the base data. The delta
+ * is expressed as a sequence of copy and insert instructions. A copy
+ * instruction has the form "COPY fromOffset length" and says "copy length bytes
+ * from the base, starting at offset fromOffset, to the result". An insert
+ * instruction has the form "INSERT length" followed by length bytes and says
+ * "copy the next length bytes from the delta to the result".
+ * </p>
+ * <p>
+ * These instructions are generated using a content-defined chunking algorithm
+ * (currently C git uses the standard Rabin variant; but there are others that
+ * could be used) that identifies equal chunks. It is entirely possible that a
+ * later copy instruction has a fromOffset that is before the fromOffset of an
+ * earlier copy instruction.
+ * </p>
+ * <p>
+ * This makes it impossible to stream the base.
+ * </p>
+ * <p>
+ * JGit is limited to 2GB maximum size for the base since array indices are
+ * signed 32bit values.
+ *
+ * @since 5.12
+ */
+public class BinaryDeltaInputStream extends InputStream {
+
+	private final byte[] base;
+
+	private final InputStream delta;
+
+	private long resultLength;
+
+	private long toDeliver = -1;
+
+	private int fromBase;
+
+	private int fromDelta;
+
+	private int baseOffset = -1;
+
+	/**
+	 * Creates a new {@link BinaryDeltaInputStream} that applies {@code delta}
+	 * to {@code base}.
+	 *
+	 * @param base
+	 *            data to apply the delta to
+	 * @param delta
+	 *            {@link InputStream} delivering the delta to apply
+	 */
+	public BinaryDeltaInputStream(byte[] base, InputStream delta) {
+		this.base = base;
+		this.delta = delta;
+	}
+
+	@Override
+	public int read() throws IOException {
+		int b = readNext();
+		if (b >= 0) {
+			toDeliver--;
+		}
+		return b;
+	}
+
+	@Override
+	public int read(byte[] b, int off, int len) throws IOException {
+		return super.read(b, off, len);
+	}
+
+	private void initialize() throws IOException {
+		long baseSize = readVarInt(delta);
+		if (baseSize > Integer.MAX_VALUE || baseSize < 0
+				|| (int) baseSize != base.length) {
+			throw new IOException(MessageFormat.format(
+					JGitText.get().binaryDeltaBaseLengthMismatch,
+					Integer.valueOf(base.length), Long.valueOf(baseSize)));
+		}
+		resultLength = readVarInt(delta);
+		if (resultLength < 0) {
+			throw new StreamCorruptedException(
+					JGitText.get().binaryDeltaInvalidResultLength);
+		}
+		toDeliver = resultLength;
+		baseOffset = 0;
+	}
+
+	private int readNext() throws IOException {
+		if (baseOffset < 0) {
+			initialize();
+		}
+		if (fromBase > 0) {
+			fromBase--;
+			return base[baseOffset++] & 0xFF;
+		} else if (fromDelta > 0) {
+			fromDelta--;
+			return delta.read();
+		}
+		int command = delta.read();
+		if (command < 0) {
+			return -1;
+		}
+		if ((command & 0x80) != 0) {
+			// Decode offset and length to read from base
+			long copyOffset = 0;
+			for (int i = 1, shift = 0; i < 0x10; i *= 2, shift += 8) {
+				if ((command & i) != 0) {
+					copyOffset |= ((long) next(delta)) << shift;
+				}
+			}
+			int copySize = 0;
+			for (int i = 0x10, shift = 0; i < 0x80; i *= 2, shift += 8) {
+				if ((command & i) != 0) {
+					copySize |= next(delta) << shift;
+				}
+			}
+			if (copySize == 0) {
+				copySize = 0x10000;
+			}
+			if (copyOffset > base.length - copySize) {
+				throw new StreamCorruptedException(MessageFormat.format(
+						JGitText.get().binaryDeltaInvalidOffset,
+						Long.valueOf(copyOffset), Integer.valueOf(copySize)));
+			}
+			baseOffset = (int) copyOffset;
+			fromBase = copySize;
+			return readNext();
+		} else if (command != 0) {
+			// The next 'command' bytes come from the delta
+			fromDelta = command - 1;
+			return delta.read();
+		} else {
+			// Zero is reserved
+			throw new StreamCorruptedException(
+					JGitText.get().unsupportedCommand0);
+		}
+	}
+
+	private int next(InputStream in) throws IOException {
+		int b = in.read();
+		if (b < 0) {
+			throw new EOFException();
+		}
+		return b;
+	}
+
+	private long readVarInt(InputStream in) throws IOException {
+		long val = 0;
+		int shift = 0;
+		int b;
+		do {
+			b = next(in);
+			val |= ((long) (b & 0x7f)) << shift;
+			shift += 7;
+		} while ((b & 0x80) != 0);
+		return val;
+	}
+
+	/**
+	 * Tells the expected size of the final result.
+	 *
+	 * @return the size
+	 * @throws IOException
+	 *             if the size cannot be determined from {@code delta}
+	 */
+	public long getExpectedResultSize() throws IOException {
+		if (baseOffset < 0) {
+			initialize();
+		}
+		return resultLength;
+	}
+
+	/**
+	 * Tells whether the delta has been fully consumed, and the expected number
+	 * of bytes for the combined result have been read from this
+	 * {@link BinaryDeltaInputStream}.
+	 *
+	 * @return whether delta application was successful
+	 */
+	public boolean isFullyConsumed() {
+		try {
+			return toDeliver == 0 && delta.read() < 0;
+		} catch (IOException e) {
+			return toDeliver == 0;
+		}
+	}
+
+	@Override
+	public void close() throws IOException {
+		delta.close();
+	}
+}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/BinaryHunkInputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/BinaryHunkInputStream.java
new file mode 100644
index 0000000..4f940d7
--- /dev/null
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/BinaryHunkInputStream.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright (C) 2021 Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.util.io;
+
+import java.io.EOFException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StreamCorruptedException;
+import java.text.MessageFormat;
+
+import org.eclipse.jgit.internal.JGitText;
+import org.eclipse.jgit.util.Base85;
+
+/**
+ * A stream that decodes git binary patch data on the fly.
+ *
+ * @since 5.12
+ */
+public class BinaryHunkInputStream extends InputStream {
+
+	private final InputStream in;
+
+	private int lineNumber;
+
+	private byte[] buffer;
+
+	private int pos = 0;
+
+	/**
+	 * Creates a new {@link BinaryHunkInputStream}.
+	 *
+	 * @param in
+	 *            {@link InputStream} to read the base-85 encoded patch data
+	 *            from
+	 */
+	public BinaryHunkInputStream(InputStream in) {
+		this.in = in;
+	}
+
+	@Override
+	public int read() throws IOException {
+		if (pos < 0) {
+			return -1;
+		}
+		if (buffer == null || pos == buffer.length) {
+			fillBuffer();
+		}
+		if (pos >= 0) {
+			return buffer[pos++] & 0xFF;
+		}
+		return -1;
+	}
+
+	@Override
+	public int read(byte[] b, int off, int len) throws IOException {
+		return super.read(b, off, len);
+	}
+
+	@Override
+	public void close() throws IOException {
+		in.close();
+		buffer = null;
+	}
+
+	private void fillBuffer() throws IOException {
+		int length = in.read();
+		if (length < 0) {
+			pos = length;
+			buffer = null;
+			return;
+		}
+		lineNumber++;
+		// Length is encoded with characters, A..Z for 1..26 and a..z for 27..52
+		if ('A' <= length && length <= 'Z') {
+			length = length - 'A' + 1;
+		} else if ('a' <= length && length <= 'z') {
+			length = length - 'a' + 27;
+		} else {
+			throw new StreamCorruptedException(MessageFormat.format(
+					JGitText.get().binaryHunkInvalidLength,
+					Integer.valueOf(lineNumber), Integer.toHexString(length)));
+		}
+		byte[] encoded = new byte[Base85.encodedLength(length)];
+		for (int i = 0; i < encoded.length; i++) {
+			int b = in.read();
+			if (b < 0 || b == '\n') {
+				throw new EOFException(MessageFormat.format(
+						JGitText.get().binaryHunkInvalidLength,
+						Integer.valueOf(lineNumber)));
+			}
+			encoded[i] = (byte) b;
+		}
+		// Must be followed by a newline; tolerate EOF.
+		int b = in.read();
+		if (b >= 0 && b != '\n') {
+			throw new StreamCorruptedException(MessageFormat.format(
+					JGitText.get().binaryHunkMissingNewline,
+					Integer.valueOf(lineNumber)));
+		}
+		try {
+			buffer = Base85.decode(encoded, length);
+		} catch (IllegalArgumentException e) {
+			StreamCorruptedException ex = new StreamCorruptedException(
+					MessageFormat.format(JGitText.get().binaryHunkDecodeError,
+							Integer.valueOf(lineNumber)));
+			ex.initCause(e);
+			throw ex;
+		}
+		pos = 0;
+	}
+}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/BinaryHunkOutputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/BinaryHunkOutputStream.java
new file mode 100644
index 0000000..30551c0
--- /dev/null
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/BinaryHunkOutputStream.java
@@ -0,0 +1,116 @@
+/*
+ * Copyright (C) 2021 Thomas Wolf <thomas.wolf@paranor.ch> and others
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v. 1.0 which is available at
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.util.io;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.eclipse.jgit.util.Base85;
+
+/**
+ * An {@link OutputStream} that encodes data for a git binary patch.
+ *
+ * @since 5.12
+ */
+public class BinaryHunkOutputStream extends OutputStream {
+
+	private static final int MAX_BYTES = 52;
+
+	private final OutputStream out;
+
+	private final byte[] buffer = new byte[MAX_BYTES];
+
+	private int pos;
+
+	/**
+	 * Creates a new {@link BinaryHunkOutputStream}.
+	 *
+	 * @param out
+	 *            {@link OutputStream} to write the encoded data to
+	 */
+	public BinaryHunkOutputStream(OutputStream out) {
+		this.out = out;
+	}
+
+	/**
+	 * Flushes and closes this stream, and closes the underlying
+	 * {@link OutputStream}.
+	 */
+	@Override
+	public void close() throws IOException {
+		flush();
+		out.close();
+	}
+
+	/**
+	 * Writes any buffered output as a binary patch line to the underlying
+	 * {@link OutputStream} and flushes that stream, too.
+	 */
+	@Override
+	public void flush() throws IOException {
+		if (pos > 0) {
+			encode(buffer, 0, pos);
+			pos = 0;
+		}
+		out.flush();
+	}
+
+	@Override
+	public void write(int b) throws IOException {
+		buffer[pos++] = (byte) b;
+		if (pos == buffer.length) {
+			encode(buffer, 0, pos);
+			pos = 0;
+		}
+	}
+
+	@Override
+	public void write(byte[] b, int off, int len) throws IOException {
+		if (len == 0) {
+			return;
+		}
+		int toCopy = len;
+		int in = off;
+		if (pos > 0) {
+			// Fill the buffer
+			int chunk = Math.min(toCopy, buffer.length - pos);
+			System.arraycopy(b, in, buffer, pos, chunk);
+			in += chunk;
+			pos += chunk;
+			toCopy -= chunk;
+			if (pos == buffer.length) {
+				encode(buffer, 0, pos);
+				pos = 0;
+			}
+			if (toCopy == 0) {
+				return;
+			}
+		}
+		while (toCopy >= MAX_BYTES) {
+			encode(b, in, MAX_BYTES);
+			toCopy -= MAX_BYTES;
+			in += MAX_BYTES;
+		}
+		if (toCopy > 0) {
+			System.arraycopy(b, in, buffer, 0, toCopy);
+			pos = toCopy;
+		}
+	}
+
+	private void encode(byte[] data, int off, int length) throws IOException {
+		if (length <= 26) {
+			out.write('A' + length - 1);
+		} else {
+			out.write('a' + length - 27);
+		}
+		out.write(Base85.encode(data, off, length));
+		out.write('\n');
+	}
+}
diff --git a/pom.xml b/pom.xml
index b888ad3..5c5a4c7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -18,7 +18,7 @@
   <groupId>org.eclipse.jgit</groupId>
   <artifactId>org.eclipse.jgit-parent</artifactId>
   <packaging>pom</packaging>
-  <version>5.11.2-SNAPSHOT</version>
+  <version>5.12.1-SNAPSHOT</version>
 
   <name>JGit - Parent</name>
   <url>${jgit-url}</url>
@@ -151,7 +151,7 @@
     <maven.compiler.target>1.8</maven.compiler.target>
     <bundle-manifest>${project.build.directory}/META-INF/MANIFEST.MF</bundle-manifest>
 
-    <jgit-last-release-version>5.10.0.202012080955-r</jgit-last-release-version>
+    <jgit-last-release-version>5.11.0.202103091610-r</jgit-last-release-version>
     <apache-sshd-version>2.6.0</apache-sshd-version>
     <jsch-version>0.1.55</jsch-version>
     <jzlib-version>1.1.1</jzlib-version>
@@ -162,18 +162,18 @@
     <commons-compress-version>1.19</commons-compress-version>
     <osgi-core-version>4.3.1</osgi-core-version>
     <servlet-api-version>3.1.0</servlet-api-version>
-    <jetty-version>9.4.36.v20210114</jetty-version>
-    <japicmp-version>0.14.4</japicmp-version>
+    <jetty-version>9.4.41.v20210516</jetty-version>
+    <japicmp-version>0.15.3</japicmp-version>
     <httpclient-version>4.5.13</httpclient-version>
     <httpcore-version>4.4.14</httpcore-version>
     <slf4j-version>1.7.30</slf4j-version>
     <log4j-version>1.2.15</log4j-version>
-    <maven-javadoc-plugin-version>3.2.0</maven-javadoc-plugin-version>
+    <maven-javadoc-plugin-version>3.3.0</maven-javadoc-plugin-version>
     <tycho-extras-version>1.7.0</tycho-extras-version>
     <gson-version>2.8.6</gson-version>
     <bouncycastle-version>1.65</bouncycastle-version>
-    <spotbugs-maven-plugin-version>4.2.0</spotbugs-maven-plugin-version>
-    <maven-project-info-reports-plugin-version>3.1.1</maven-project-info-reports-plugin-version>
+    <spotbugs-maven-plugin-version>4.2.3</spotbugs-maven-plugin-version>
+    <maven-project-info-reports-plugin-version>3.1.2</maven-project-info-reports-plugin-version>
     <maven-jxr-plugin-version>3.0.0</maven-jxr-plugin-version>
     <maven-surefire-plugin-version>3.0.0-M5</maven-surefire-plugin-version>
     <maven-surefire-report-plugin-version>${maven-surefire-plugin-version}</maven-surefire-report-plugin-version>
@@ -330,7 +330,7 @@
         <plugin>
           <groupId>org.eclipse.cbi.maven.plugins</groupId>
           <artifactId>eclipse-jarsigner-plugin</artifactId>
-          <version>1.1.7</version>
+          <version>1.3.1</version>
         </plugin>
         <plugin>
           <groupId>org.eclipse.tycho.extras</groupId>
@@ -355,7 +355,7 @@
             <dependency><!-- add support for ssh/scp -->
               <groupId>org.apache.maven.wagon</groupId>
               <artifactId>wagon-ssh</artifactId>
-              <version>3.4.2</version>
+              <version>3.4.3</version>
             </dependency>
           </dependencies>
         </plugin>
@@ -397,7 +397,7 @@
         <plugin>
           <groupId>org.springframework.boot</groupId>
           <artifactId>spring-boot-maven-plugin</artifactId>
-          <version>2.4.1</version>
+          <version>2.4.4</version>
         </plugin>
         <plugin>
           <groupId>org.eclipse.dash</groupId>
@@ -900,7 +900,7 @@
               <dependency>
                 <groupId>org.eclipse.jdt</groupId>
                 <artifactId>ecj</artifactId>
-                <version>3.24.0</version>
+                <version>3.25.0</version>
               </dependency>
             </dependencies>
           </plugin>