Merge branch 'stable-6.3'

* stable-6.3:
  Remove unused imports

Change-Id: I4a92c5afb8f179798234eb772eb34879d41808af
diff --git a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF
index 87a5f5a..cc7385a 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: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-11
 Import-Package: org.apache.tools.ant,
- org.eclipse.jgit.ant.tasks;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.junit;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lib;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util;version="[6.3.1,6.4.0)",
+ org.eclipse.jgit.ant.tasks;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.junit;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lib;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util;version="[6.4.0,6.5.0)",
  org.hamcrest.core;version="[1.1.0,3.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 bcd87a7..aba268c 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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 0d3e40f..556d6a4 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: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-11
 Import-Package: org.apache.tools.ant,
-  org.eclipse.jgit.storage.file;version="[6.3.1,6.4.0)"
+  org.eclipse.jgit.storage.file;version="[6.4.0,6.5.0)"
 Bundle-Localization: plugin
 Bundle-Vendor: %Bundle-Vendor
-Export-Package: org.eclipse.jgit.ant;version="6.3.1",
- org.eclipse.jgit.ant.tasks;version="6.3.1";
+Export-Package: org.eclipse.jgit.ant;version="6.4.0",
+ org.eclipse.jgit.ant.tasks;version="6.4.0";
   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 af7a021..d2dcd06 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: 6.3.1.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.ant;version="6.3.1.qualifier";roots="."
+Bundle-Version: 6.4.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.ant;version="6.4.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.ant/pom.xml b/org.eclipse.jgit.ant/pom.xml
index df207ca..6ccea33 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.ant</artifactId>
diff --git a/org.eclipse.jgit.archive/META-INF/MANIFEST.MF b/org.eclipse.jgit.archive/META-INF/MANIFEST.MF
index 42e207d..2732a6b 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: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-11
@@ -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="[6.3.1,6.4.0)",
- org.eclipse.jgit.lib;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.nls;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.revwalk;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util;version="[6.3.1,6.4.0)",
+ org.eclipse.jgit.api;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lib;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.nls;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.revwalk;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util;version="[6.4.0,6.5.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="6.3.1";
+Export-Package: org.eclipse.jgit.archive;version="6.4.0";
   uses:="org.eclipse.jgit.lib,
    org.eclipse.jgit.api,
    org.apache.commons.compress.archivers,
    org.osgi.framework",
- org.eclipse.jgit.archive.internal;version="6.3.1";x-internal:=true
+ org.eclipse.jgit.archive.internal;version="6.4.0";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 816fef3..1c8cc9a 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: 6.3.1.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.archive;version="6.3.1.qualifier";roots="."
+Bundle-Version: 6.4.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.archive;version="6.4.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.archive/pom.xml b/org.eclipse.jgit.archive/pom.xml
index 3376350..92f5a16 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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 6bd2ab5..fbd192e 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>6.3.1-SNAPSHOT</version>
+  <version>6.4.0-SNAPSHOT</version>
   <artifactId>org.eclipse.jgit.benchmarks</artifactId>
   <packaging>jar</packaging>
 
diff --git a/org.eclipse.jgit.coverage/pom.xml b/org.eclipse.jgit.coverage/pom.xml
index d148b72..66f28e3 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
 
@@ -27,88 +27,88 @@
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit</artifactId>
-      <version>6.3.1-SNAPSHOT</version>
+      <version>6.4.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.ant</artifactId>
-      <version>6.3.1-SNAPSHOT</version>
+      <version>6.4.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.archive</artifactId>
-      <version>6.3.1-SNAPSHOT</version>
+      <version>6.4.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.http.apache</artifactId>
-      <version>6.3.1-SNAPSHOT</version>
+      <version>6.4.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.http.server</artifactId>
-      <version>6.3.1-SNAPSHOT</version>
+      <version>6.4.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.lfs</artifactId>
-      <version>6.3.1-SNAPSHOT</version>
+      <version>6.4.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.lfs.server</artifactId>
-      <version>6.3.1-SNAPSHOT</version>
+      <version>6.4.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.pgm</artifactId>
-      <version>6.3.1-SNAPSHOT</version>
+      <version>6.4.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.ui</artifactId>
-      <version>6.3.1-SNAPSHOT</version>
+      <version>6.4.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.ssh.apache</artifactId>
-      <version>6.3.1-SNAPSHOT</version>
+      <version>6.4.0-SNAPSHOT</version>
     </dependency>
 
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.test</artifactId>
-      <version>6.3.1-SNAPSHOT</version>
+      <version>6.4.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.ant.test</artifactId>
-      <version>6.3.1-SNAPSHOT</version>
+      <version>6.4.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.http.test</artifactId>
-      <version>6.3.1-SNAPSHOT</version>
+      <version>6.4.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.pgm.test</artifactId>
-      <version>6.3.1-SNAPSHOT</version>
+      <version>6.4.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.lfs.test</artifactId>
-      <version>6.3.1-SNAPSHOT</version>
+      <version>6.4.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.lfs.server.test</artifactId>
-      <version>6.3.1-SNAPSHOT</version>
+      <version>6.4.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.ssh.apache.test</artifactId>
-      <version>6.3.1-SNAPSHOT</version>
+      <version>6.4.0-SNAPSHOT</version>
     </dependency>
   </dependencies>
 
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 0eec0f6..d497f7e 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: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-11
@@ -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="[6.3.1,6.4.0)",
- org.eclipse.jgit.gpg.bc.internal.keys;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util.sha1;version="[6.3.1,6.4.0)",
+ org.eclipse.jgit.gpg.bc.internal;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.gpg.bc.internal.keys;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util.sha1;version="[6.4.0,6.5.0)",
  org.hamcrest;version="[1.1.0,3.0.0)",
  org.junit;version="[4.13,5.0.0)",
  org.junit.runner;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 5f16956..92e20a4 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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 02d9cfe..72a61e2 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="[6.3.1,6.4.0)"
+Fragment-Host: org.eclipse.jgit;bundle-version="[6.4.0,6.5.0)"
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
-Bundle-Version: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-11
 Import-Package: org.bouncycastle.asn1;version="[1.69.0,2.0.0)",
  org.bouncycastle.asn1.cryptlib;version="[1.69.0,2.0.0)",
@@ -29,9 +29,9 @@
  org.bouncycastle.util;version="[1.69.0,2.0.0)",
  org.bouncycastle.util.encoders;version="[1.69.0,2.0.0)",
  org.bouncycastle.util.io;version="[1.69.0,2.0.0)",
- org.eclipse.jgit.annotations;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.api.errors;version="[6.3.1,6.4.0)",
+ org.eclipse.jgit.annotations;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.api.errors;version="[6.4.0,6.5.0)",
  org.slf4j;version="[1.7.0,2.0.0)"
-Export-Package: org.eclipse.jgit.gpg.bc;version="6.3.1",
- org.eclipse.jgit.gpg.bc.internal;version="6.3.1";x-friends:="org.eclipse.jgit.gpg.bc.test",
- org.eclipse.jgit.gpg.bc.internal.keys;version="6.3.1";x-friends:="org.eclipse.jgit.gpg.bc.test"
+Export-Package: org.eclipse.jgit.gpg.bc;version="6.4.0",
+ org.eclipse.jgit.gpg.bc.internal;version="6.4.0";x-friends:="org.eclipse.jgit.gpg.bc.test",
+ org.eclipse.jgit.gpg.bc.internal.keys;version="6.4.0";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 795cbce..3d06cb2 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: 6.3.1.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.gpg.bc;version="6.3.1.qualifier";roots="."
+Bundle-Version: 6.4.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.gpg.bc;version="6.4.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.gpg.bc/pom.xml b/org.eclipse.jgit.gpg.bc/pom.xml
index 3110807..375c9d3 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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 0587abf..76948ee 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: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-11
 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="[6.3.1,6.4.0)",
- org.eclipse.jgit.nls;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport.http;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util;version="[6.3.1,6.4.0)"
-Export-Package: org.eclipse.jgit.transport.http.apache;version="6.3.1";
+ org.eclipse.jgit.annotations;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.nls;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport.http;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util;version="[6.4.0,6.5.0)"
+Export-Package: org.eclipse.jgit.transport.http.apache;version="6.4.0";
   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 fcc2df7..f31b5d7 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: 6.3.1.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.http.apache;version="6.3.1.qualifier";roots="."
+Bundle-Version: 6.4.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.http.apache;version="6.4.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.http.apache/pom.xml b/org.eclipse.jgit.http.apache/pom.xml
index a7e4f3b..30318cd 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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 2eb2978..aa1bf29 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: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-Localization: plugin
 Bundle-Vendor: %Bundle-Vendor
-Export-Package: org.eclipse.jgit.http.server;version="6.3.1",
- org.eclipse.jgit.http.server.glue;version="6.3.1";
+Export-Package: org.eclipse.jgit.http.server;version="6.4.0",
+ org.eclipse.jgit.http.server.glue;version="6.4.0";
   uses:="javax.servlet,javax.servlet.http",
- org.eclipse.jgit.http.server.resolver;version="6.3.1";
+ org.eclipse.jgit.http.server.resolver;version="6.4.0";
   uses:="org.eclipse.jgit.transport.resolver,
    org.eclipse.jgit.lib,
    org.eclipse.jgit.transport,
@@ -18,14 +18,14 @@
 Bundle-RequiredExecutionEnvironment: JavaSE-11
 Import-Package: javax.servlet;version="[2.5.0,5.0.0)",
  javax.servlet.http;version="[2.5.0,5.0.0)",
- org.eclipse.jgit.annotations;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.errors;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.storage.dfs;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.storage.file;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.transport.parser;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lib;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.nls;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.revwalk;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport.resolver;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util;version="[6.3.1,6.4.0)"
+ org.eclipse.jgit.annotations;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.errors;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.storage.dfs;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.storage.file;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.transport.parser;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lib;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.nls;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.revwalk;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport.resolver;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util;version="[6.4.0,6.5.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 b9aefb0..2953ccf 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: 6.3.1.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.http.server;version="6.3.1.qualifier";roots="."
+Bundle-Version: 6.4.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.http.server;version="6.4.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.http.server/pom.xml b/org.eclipse.jgit.http.server/pom.xml
index 8364fc6..06beb34 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.http.server</artifactId>
diff --git a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF
index d585f28..dc709a3 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: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-11
@@ -26,26 +26,26 @@
  org.eclipse.jetty.util.log;version="[10.0.0,11.0.0)",
  org.eclipse.jetty.util.security;version="[10.0.0,11.0.0)",
  org.eclipse.jetty.util.thread;version="[10.0.0,11.0.0)",
- org.eclipse.jgit.api;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.errors;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.http.server;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.http.server.glue;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.http.server.resolver;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.storage.dfs;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.storage.file;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.storage.reftable;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.junit;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.junit.http;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lib;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.nls;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.revwalk;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.storage.file;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport.http;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport.http.apache;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport.resolver;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util;version="[6.3.1,6.4.0)",
+ org.eclipse.jgit.api;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.errors;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.http.server;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.http.server.glue;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.http.server.resolver;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.storage.dfs;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.storage.file;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.storage.reftable;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.junit;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.junit.http;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lib;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.nls;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.revwalk;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.storage.file;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport.http;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport.http.apache;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport.resolver;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util;version="[6.4.0,6.5.0)",
  org.hamcrest;version="[1.1.0,3.0.0)",
  org.hamcrest.core;version="[1.1.0,3.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 f71782b..4767d20 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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 30e3306..2190707 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: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-Localization: plugin
 Bundle-Vendor: %Bundle-Vendor
 Bundle-ActivationPolicy: lazy
@@ -21,17 +21,17 @@
  org.eclipse.jetty.util.log;version="[10.0.0,11.0.0)",
  org.eclipse.jetty.util.security;version="[10.0.0,11.0.0)",
  org.eclipse.jetty.util.ssl;version="[10.0.0,11.0.0)",
- org.eclipse.jgit.errors;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.http.server;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.storage.file;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.junit;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lib;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.revwalk;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport.resolver;version="[6.3.1,6.4.0)",
+ org.eclipse.jgit.errors;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.http.server;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.storage.file;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.junit;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lib;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.revwalk;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport.resolver;version="[6.4.0,6.5.0)",
  org.junit;version="[4.13,5.0.0)",
  org.slf4j.helpers;version="[1.7.0,2.0.0)"
-Export-Package: org.eclipse.jgit.junit.http;version="6.3.1";
+Export-Package: org.eclipse.jgit.junit.http;version="6.4.0";
   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 d50a9a4..4b3741b 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: 6.3.1.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.junit.http;version="6.3.1.qualifier";roots="."
+Bundle-Version: 6.4.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.junit.http;version="6.4.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.junit.http/pom.xml b/org.eclipse.jgit.junit.http/pom.xml
index 7020d02..f76f90f 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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 e878090..e2fb037 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: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-Localization: plugin
 Bundle-Vendor: %Bundle-Vendor
 Bundle-ActivationPolicy: lazy
@@ -33,16 +33,16 @@
  org.apache.sshd.server.subsystem;version="[2.8.0,2.9.0)",
  org.apache.sshd.sftp;version="[2.8.0,2.9.0)",
  org.apache.sshd.sftp.server;version="[2.8.0,2.9.0)",
- org.eclipse.jgit.annotations;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.api;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.api.errors;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.errors;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.junit;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lib;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.revwalk;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util;version="[6.3.1,6.4.0)",
+ org.eclipse.jgit.annotations;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.api;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.api.errors;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.errors;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.junit;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lib;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.revwalk;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util;version="[6.4.0,6.5.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="6.3.1"
+Export-Package: org.eclipse.jgit.junit.ssh;version="6.4.0"
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 8627975..f1c8d62 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: 6.3.1.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.junit.ssh;version="6.3.1.qualifier";roots="."
+Bundle-Version: 6.4.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.junit.ssh;version="6.4.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.junit.ssh/pom.xml b/org.eclipse.jgit.junit.ssh/pom.xml
index ba82ed4..04988c4 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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 b2cb44b..63d19d1 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: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-Localization: plugin
 Bundle-Vendor: %Bundle-Vendor
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-11
-Import-Package: org.eclipse.jgit.annotations;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.api;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.api.errors;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.dircache;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.errors;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.storage.file;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.storage.pack;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lib;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.merge;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.revwalk;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.storage.file;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport;version="6.3.1",
- org.eclipse.jgit.treewalk;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.treewalk.filter;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util.io;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util.time;version="[6.3.1,6.4.0)",
+Import-Package: org.eclipse.jgit.annotations;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.api;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.api.errors;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.dircache;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.errors;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.storage.file;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.storage.pack;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lib;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.merge;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.revwalk;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.storage.file;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport;version="6.4.0",
+ org.eclipse.jgit.treewalk;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.treewalk.filter;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util.io;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util.time;version="[6.4.0,6.5.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="6.3.1";
+Export-Package: org.eclipse.jgit.junit;version="6.4.0";
   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="6.3.1";uses:="org.eclipse.jgit.util.time"
+ org.eclipse.jgit.junit.time;version="6.4.0";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 4daa576..b3d3b41 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: 6.3.1.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.junit;version="6.3.1.qualifier";roots="."
+Bundle-Version: 6.4.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.junit;version="6.4.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.junit/pom.xml b/org.eclipse.jgit.junit/pom.xml
index fe2211b..329be51 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.junit</artifactId>
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 5962ebb..59485aa 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: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-11
@@ -26,24 +26,24 @@
  org.eclipse.jetty.util.log;version="[10.0.0,11.0.0)",
  org.eclipse.jetty.util.security;version="[10.0.0,11.0.0)",
  org.eclipse.jetty.util.thread;version="[10.0.0,11.0.0)",
- org.eclipse.jgit.api;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.api.errors;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.storage.file;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.junit;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.junit.http;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lfs;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lfs.errors;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lfs.lib;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lfs.server;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lfs.server.fs;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lfs.test;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lib;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.revwalk;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.storage.file;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.treewalk;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.treewalk.filter;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util;version="[6.3.1,6.4.0)",
+ org.eclipse.jgit.api;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.api.errors;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.storage.file;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.junit;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.junit.http;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lfs;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lfs.errors;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lfs.lib;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lfs.server;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lfs.server.fs;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lfs.test;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lib;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.revwalk;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.storage.file;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.treewalk;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.treewalk.filter;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util;version="[6.4.0,6.5.0)",
  org.hamcrest.core;version="[1.1.0,3.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 baa6a9d..d27a967 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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 1e7dc5f..68f2042 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: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-Localization: plugin
 Bundle-Vendor: %Bundle-Vendor
-Export-Package: org.eclipse.jgit.lfs.server;version="6.3.1";
+Export-Package: org.eclipse.jgit.lfs.server;version="6.4.0";
   uses:="javax.servlet.http,
    org.eclipse.jgit.lfs.lib",
- org.eclipse.jgit.lfs.server.fs;version="6.3.1";
+ org.eclipse.jgit.lfs.server.fs;version="6.4.0";
   uses:="javax.servlet,
    javax.servlet.http,
    org.eclipse.jgit.lfs.server,
    org.eclipse.jgit.lfs.lib",
- org.eclipse.jgit.lfs.server.internal;version="6.3.1";x-internal:=true,
- org.eclipse.jgit.lfs.server.s3;version="6.3.1";
+ org.eclipse.jgit.lfs.server.internal;version="6.4.0";x-internal:=true,
+ org.eclipse.jgit.lfs.server.s3;version="6.4.0";
   uses:="org.eclipse.jgit.lfs.server,
    org.eclipse.jgit.lfs.lib"
 Bundle-RequiredExecutionEnvironment: JavaSE-11
@@ -24,15 +24,15 @@
  javax.servlet.annotation;version="[3.1.0,5.0.0)",
  javax.servlet.http;version="[3.1.0,5.0.0)",
  org.apache.http;version="[4.3.0,5.0.0)",
- org.eclipse.jgit.annotations;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.storage.file;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lfs.errors;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lfs.internal;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lfs.lib;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lib;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.nls;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport.http;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport.http.apache;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util;version="[6.3.1,6.4.0)",
+ org.eclipse.jgit.annotations;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.storage.file;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lfs.errors;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lfs.internal;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lfs.lib;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lib;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.nls;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport.http;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport.http.apache;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util;version="[6.4.0,6.5.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 b42fb0a..bd9fb71 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: 6.3.1.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.lfs.server;version="6.3.1.qualifier";roots="."
+Bundle-Version: 6.4.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.lfs.server;version="6.4.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.lfs.server/pom.xml b/org.eclipse.jgit.lfs.server/pom.xml
index 7944938..1a435a2 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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 e849423..68db77f 100644
--- a/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF
@@ -3,27 +3,27 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.lfs.test
 Bundle-SymbolicName: org.eclipse.jgit.lfs.test
-Bundle-Version: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-11
-Import-Package: org.eclipse.jgit.api;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.attributes;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.storage.dfs;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.junit;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lfs;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lfs.errors;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lfs.internal;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lfs.lib;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lib;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.revwalk;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport.http;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.treewalk;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.treewalk.filter;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util;version="[6.3.1,6.4.0)",
+Import-Package: org.eclipse.jgit.api;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.attributes;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.storage.dfs;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.junit;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lfs;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lfs.errors;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lfs.internal;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lfs.lib;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lib;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.revwalk;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport.http;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.treewalk;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.treewalk.filter;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util;version="[6.4.0,6.5.0)",
  org.hamcrest.core;version="[1.1.0,3.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="6.3.1";x-friends:="org.eclipse.jgit.lfs.server.test"
+Export-Package: org.eclipse.jgit.lfs.test;version="6.4.0";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 ab82454..faa37be 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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 f1aee3a..e744ac1 100644
--- a/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF
@@ -3,32 +3,32 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.lfs
 Bundle-SymbolicName: org.eclipse.jgit.lfs
-Bundle-Version: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-Localization: plugin
 Bundle-Vendor: %Bundle-Vendor
-Export-Package: org.eclipse.jgit.lfs;version="6.3.1",
- org.eclipse.jgit.lfs.errors;version="6.3.1",
- org.eclipse.jgit.lfs.internal;version="6.3.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="6.3.1"
+Export-Package: org.eclipse.jgit.lfs;version="6.4.0",
+ org.eclipse.jgit.lfs.errors;version="6.4.0",
+ org.eclipse.jgit.lfs.internal;version="6.4.0";x-friends:="org.eclipse.jgit.lfs.test,org.eclipse.jgit.lfs.server.fs,org.eclipse.jgit.lfs.server",
+ org.eclipse.jgit.lfs.lib;version="6.4.0"
 Bundle-RequiredExecutionEnvironment: JavaSE-11
 Import-Package: com.google.gson;version="[2.8.2,3.0.0)",
  com.google.gson.stream;version="[2.8.2,3.0.0)",
- org.eclipse.jgit.annotations;version="[6.3.1,6.4.0)";resolution:=optional,
- org.eclipse.jgit.api.errors;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.attributes;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.diff;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.dircache;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.errors;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.hooks;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.storage.file;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lib;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.nls;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.revwalk;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.storage.file;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.storage.pack;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport.http;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.treewalk;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.treewalk.filter;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util.io;version="[6.3.1,6.4.0)"
+ org.eclipse.jgit.annotations;version="[6.4.0,6.5.0)";resolution:=optional,
+ org.eclipse.jgit.api.errors;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.attributes;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.diff;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.dircache;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.errors;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.hooks;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.storage.file;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lib;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.nls;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.revwalk;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.storage.file;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.storage.pack;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport.http;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.treewalk;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.treewalk.filter;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util.io;version="[6.4.0,6.5.0)"
diff --git a/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF
index e1ff6fa..95b74f0 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: 6.3.1.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.lfs;version="6.3.1.qualifier";roots="."
+Bundle-Version: 6.4.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.lfs;version="6.4.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.lfs/pom.xml b/org.eclipse.jgit.lfs/pom.xml
index abf2ff7..54fb971 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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 75f416a..22ce927 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="6.3.1.qualifier"
+      version="6.4.0.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 ee11048..7fb5616 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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 e73ae31..567f5fa 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="6.3.1.qualifier"
+      version="6.4.0.qualifier"
       provider-name="%providerName">
 
    <description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
    </url>
 
    <requires>
-      <import plugin="org.eclipse.jgit" version="6.3.1" match="equivalent"/>
+      <import plugin="org.eclipse.jgit" version="6.4.0" 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 1bbf567..732bad9 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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 58d484f..460a074 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="6.3.1.qualifier"
+      version="6.4.0.qualifier"
       provider-name="%providerName">
 
    <description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
    </url>
 
    <requires>
-      <import plugin="org.eclipse.jgit" version="6.3.1" match="equivalent"/>
+      <import plugin="org.eclipse.jgit" version="6.4.0" 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 00ff3ce..f422341 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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 9e2aec3..72970de 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="6.3.1.qualifier"
+      version="6.4.0.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="6.3.1" match="equivalent"/>
+      <import plugin="org.eclipse.jgit" version="6.4.0" 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 ecfcf55..630f959 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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 0996158..9e1c640 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="6.3.1.qualifier"
+      version="6.4.0.qualifier"
       provider-name="%providerName">
 
    <description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
    </url>
 
    <requires>
-      <import feature="org.eclipse.jgit" version="6.3.1" match="equivalent"/>
+      <import feature="org.eclipse.jgit" version="6.4.0" 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 6c415aa..96929e4 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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 9aa6af1..c749017 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="6.3.1.qualifier"
+      version="6.4.0.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="6.3.1" match="equivalent"/>
-      <import feature="org.eclipse.jgit.lfs" version="6.3.1" match="equivalent"/>
-      <import feature="org.eclipse.jgit.ssh.apache" version="6.3.1" match="equivalent"/>
+      <import feature="org.eclipse.jgit" version="6.4.0" match="equivalent"/>
+      <import feature="org.eclipse.jgit.lfs" version="6.4.0" match="equivalent"/>
+      <import feature="org.eclipse.jgit.ssh.apache" version="6.4.0" 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 47a6a20..ab1e78c 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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 9ed0f5e..5c31a95 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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 fb5b764..7171cff 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="6.3.1.qualifier"
+      version="6.4.0.qualifier"
       provider-name="%providerName">
 
    <description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
    </url>
 
    <requires>
-      <import feature="org.eclipse.jgit" version="6.3.1" match="equivalent"/>
+      <import feature="org.eclipse.jgit" version="6.4.0" 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 e558c89..fc15b38 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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>6.3.1-SNAPSHOT</version>
+      <version>6.4.0-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 3cecf6d..f78a9e7 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="6.3.1.qualifier"
+      version="6.4.0.qualifier"
       provider-name="%providerName">
 
    <description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
    </url>
 
    <requires>
-      <import feature="org.eclipse.jgit" version="6.3.1" match="equivalent"/>
+      <import feature="org.eclipse.jgit" version="6.4.0" 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 92a0300..2a66f37 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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 a8bae00..7b5f2d9 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="6.3.1.qualifier"
+      version="6.4.0.qualifier"
       provider-name="%providerName">
 
    <description url="http://www.eclipse.org/jgit/">
@@ -23,7 +23,7 @@
    </url>
 
    <requires>
-      <import plugin="org.eclipse.jgit" version="6.3.1" match="equivalent"/>
+      <import plugin="org.eclipse.jgit" version="6.4.0" 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 bf08c98..41277c6 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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 8861f40..41b7306 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: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
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 0baf5ac..7cbd87d 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.target</artifactId>
diff --git a/org.eclipse.jgit.packaging/pom.xml b/org.eclipse.jgit.packaging/pom.xml
index bebd2a4..c124432 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>6.3.1-SNAPSHOT</version>
+  <version>6.4.0-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <name>JGit Tycho Parent</name>
diff --git a/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF
index cd947f0..d7a785c 100644
--- a/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF
@@ -3,30 +3,30 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.pgm.test
 Bundle-SymbolicName: org.eclipse.jgit.pgm.test
-Bundle-Version: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-11
-Import-Package: org.eclipse.jgit.api;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.api.errors;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.diff;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.dircache;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.diffmergetool;version="6.3.1",
- org.eclipse.jgit.internal.storage.file;version="6.3.1",
- org.eclipse.jgit.junit;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lib;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lib.internal;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.merge;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.pgm;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.pgm.internal;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.pgm.opt;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.revwalk;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.storage.file;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.treewalk;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util.io;version="[6.3.1,6.4.0)",
+Import-Package: org.eclipse.jgit.api;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.api.errors;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.diff;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.dircache;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.diffmergetool;version="6.4.0",
+ org.eclipse.jgit.internal.storage.file;version="6.4.0",
+ org.eclipse.jgit.junit;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lib;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lib.internal;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.merge;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.pgm;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.pgm.internal;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.pgm.opt;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.revwalk;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.storage.file;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.treewalk;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util.io;version="[6.4.0,6.5.0)",
  org.hamcrest.core;bundle-version="[1.1.0,3.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 fd87d92..058340d 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.pgm.test</artifactId>
diff --git a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF
index 39ea131..6d05d5f 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: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-11
@@ -14,49 +14,49 @@
  org.eclipse.jetty.servlet;version="[10.0.0,11.0.0)",
  org.eclipse.jetty.util;version="[10.0.0,11.0.0)",
  org.eclipse.jetty.util.component;version="[10.0.0,11.0.0)",
- org.eclipse.jgit.api;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.api.errors;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.archive;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.awtui;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.blame;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.diff;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.dircache;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.errors;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.gitrepo;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.storage.file;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.diffmergetool;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.storage.io;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.storage.pack;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.storage.reftable;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lfs;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lfs.server;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lfs.server.fs;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lfs.server.s3;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lib;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.merge;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lib.internal;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.nls;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.notes;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.revplot;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.revwalk;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.revwalk.filter;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.storage.file;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.storage.pack;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport.http.apache;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport.resolver;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport.ssh.jsch;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport.sshd;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.treewalk;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.treewalk.filter;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util.io;version="[6.3.1,6.4.0)",
+ org.eclipse.jgit.api;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.api.errors;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.archive;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.awtui;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.blame;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.diff;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.dircache;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.errors;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.gitrepo;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.storage.file;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.diffmergetool;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.storage.io;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.storage.pack;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.storage.reftable;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lfs;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lfs.server;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lfs.server.fs;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lfs.server.s3;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lib;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.merge;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lib.internal;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.nls;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.notes;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.revplot;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.revwalk;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.revwalk.filter;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.storage.file;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.storage.pack;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport.http.apache;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport.resolver;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport.ssh.jsch;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport.sshd;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.treewalk;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.treewalk.filter;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util.io;version="[6.4.0,6.5.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="6.3.1";
+Export-Package: org.eclipse.jgit.console;version="6.4.0";
  uses:="org.eclipse.jgit.transport,
   org.eclipse.jgit.util",
- org.eclipse.jgit.pgm;version="6.3.1";
+ org.eclipse.jgit.pgm;version="6.4.0";
   uses:="org.eclipse.jgit.transport,
    org.eclipse.jgit.util.io,
    org.eclipse.jgit.awtui,
@@ -68,14 +68,14 @@
    org.eclipse.jgit.treewalk,
    org.eclipse.jgit.api,
    javax.swing",
- org.eclipse.jgit.pgm.debug;version="6.3.1";
+ org.eclipse.jgit.pgm.debug;version="6.4.0";
   uses:="org.eclipse.jgit.util.io,
    org.eclipse.jgit.pgm,
    org.eclipse.jetty.servlet",
- org.eclipse.jgit.pgm.internal;version="6.3.1";
+ org.eclipse.jgit.pgm.internal;version="6.4.0";
   x-friends:="org.eclipse.jgit.pgm.test,
    org.eclipse.jgit.test",
- org.eclipse.jgit.pgm.opt;version="6.3.1";
+ org.eclipse.jgit.pgm.opt;version="6.4.0";
   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 4850be9..47121cb 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: 6.3.1.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="6.3.1.qualifier";roots="."
+Bundle-Version: 6.4.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.pgm;version="6.4.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.pgm/pom.xml b/org.eclipse.jgit.pgm/pom.xml
index 2a9f5d7..63d60f4 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.pgm</artifactId>
diff --git a/org.eclipse.jgit.ssh.apache.agent/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.apache.agent/META-INF/MANIFEST.MF
index ac14d95..ab52c8d 100644
--- a/org.eclipse.jgit.ssh.apache.agent/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.apache.agent/META-INF/MANIFEST.MF
@@ -2,16 +2,16 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %Bundle-Name
 Bundle-SymbolicName: org.eclipse.jgit.ssh.apache.agent;singleton:=true
-Bundle-Version: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-Localization: plugin
 Bundle-Vendor: %Bundle-Vendor
-Fragment-Host: org.eclipse.jgit.ssh.apache;bundle-version="[6.3.1,6.4.0)"
+Fragment-Host: org.eclipse.jgit.ssh.apache;bundle-version="[6.4.0,6.5.0)"
 Bundle-ActivationPolicy: lazy
 Automatic-Module-Name: org.eclipse.jgit.ssh.apache.agent
 Bundle-RequiredExecutionEnvironment: JavaSE-11
-Import-Package: org.eclipse.jgit.transport.sshd;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.nls;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util;version="[6.3.1,6.4.0)"
+Import-Package: org.eclipse.jgit.transport.sshd;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.nls;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util;version="[6.4.0,6.5.0)"
 Require-Bundle: com.sun.jna;bundle-version="[5.8.0,6.0.0)",
  com.sun.jna.platform;bundle-version="[5.8.0,6.0.0)"
-Export-Package: org.eclipse.jgit.internal.transport.sshd.agent.connector;version="6.3.1";x-internal:=true
+Export-Package: org.eclipse.jgit.internal.transport.sshd.agent.connector;version="6.4.0";x-internal:=true
diff --git a/org.eclipse.jgit.ssh.apache.agent/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.ssh.apache.agent/META-INF/SOURCE-MANIFEST.MF
index 89a56b7..701fce7 100644
--- a/org.eclipse.jgit.ssh.apache.agent/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.apache.agent/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,5 @@
 Bundle-Name: org.eclipse.jgit.ssh.apache.agent - Sources
 Bundle-SymbolicName: org.eclipse.jgit.ssh.apache.agent.source
 Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 6.3.1.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.ssh.apache.agent;version="6.3.1.qualifier";roots="."
+Bundle-Version: 6.4.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.ssh.apache.agent;version="6.4.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.ssh.apache.agent/pom.xml b/org.eclipse.jgit.ssh.apache.agent/pom.xml
index e43e3fc..c2feab1 100644
--- a/org.eclipse.jgit.ssh.apache.agent/pom.xml
+++ b/org.eclipse.jgit.ssh.apache.agent/pom.xml
@@ -17,7 +17,7 @@
   <parent>
     <groupId>org.eclipse.jgit</groupId>
     <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.ssh.apache.agent</artifactId>
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 68b9ea0..913a262 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: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-11
@@ -21,16 +21,16 @@
  org.apache.sshd.core;version="[2.8.0,2.9.0)",
  org.apache.sshd.server;version="[2.8.0,2.9.0)",
  org.apache.sshd.server.forward;version="[2.8.0,2.9.0)",
- org.eclipse.jgit.api;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.api.errors;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.transport.sshd.proxy;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.junit;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.junit.ssh;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lib;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport.sshd;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport.sshd.agent;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util;version="[6.3.1,6.4.0)",
+ org.eclipse.jgit.api;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.api.errors;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.transport.sshd.proxy;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.junit;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.junit.ssh;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lib;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport.sshd;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport.sshd.agent;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util;version="[6.4.0,6.5.0)",
  org.hamcrest;version="[1.1.0,3.0.0)",
  org.junit;version="[4.13,5.0.0)",
  org.junit.experimental.theories;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 fd882bd..aa9e55a 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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 0ff3c8d..1edde8a 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: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-11
-Export-Package: org.eclipse.jgit.internal.transport.sshd;version="6.3.1";x-internal:=true;
+Export-Package: org.eclipse.jgit.internal.transport.sshd;version="6.4.0";x-internal:=true;
   uses:="org.apache.sshd.client,
    org.apache.sshd.client.auth,
    org.apache.sshd.client.auth.keyboard,
@@ -23,17 +23,17 @@
    org.apache.sshd.common.signature,
    org.apache.sshd.common.util.buffer,
    org.eclipse.jgit.transport",
- org.eclipse.jgit.internal.transport.sshd.agent;version="6.3.1";x-internal:=true,
- org.eclipse.jgit.internal.transport.sshd.auth;version="6.3.1";x-internal:=true,
- org.eclipse.jgit.internal.transport.sshd.proxy;version="6.3.1";x-friends:="org.eclipse.jgit.ssh.apache.test",
- org.eclipse.jgit.transport.sshd;version="6.3.1";
+ org.eclipse.jgit.internal.transport.sshd.agent;version="6.4.0";x-internal:=true,
+ org.eclipse.jgit.internal.transport.sshd.auth;version="6.4.0";x-internal:=true,
+ org.eclipse.jgit.internal.transport.sshd.proxy;version="6.4.0";x-friends:="org.eclipse.jgit.ssh.apache.test",
+ org.eclipse.jgit.transport.sshd;version="6.4.0";
   uses:="org.eclipse.jgit.transport,
    org.apache.sshd.client.config.hosts,
    org.apache.sshd.common.keyprovider,
    org.eclipse.jgit.util,
    org.apache.sshd.client.session,
    org.apache.sshd.client.keyverifier",
- org.eclipse.jgit.transport.sshd.agent;version="6.3.1"
+ org.eclipse.jgit.transport.sshd.agent;version="6.4.0"
 Import-Package: net.i2p.crypto.eddsa;version="[0.3.0,0.4.0)",
  org.apache.sshd.agent;version="[2.8.0,2.9.0)",
  org.apache.sshd.client;version="[2.8.0,2.9.0)",
@@ -86,12 +86,12 @@
  org.apache.sshd.sftp;version="[2.8.0,2.9.0)",
  org.apache.sshd.sftp.client;version="[2.8.0,2.9.0)",
  org.apache.sshd.sftp.common;version="[2.8.0,2.9.0)",
- org.eclipse.jgit.annotations;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.errors;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.fnmatch;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.storage.file;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.transport.ssh;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.nls;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util;version="[6.3.1,6.4.0)",
+ org.eclipse.jgit.annotations;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.errors;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.fnmatch;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.storage.file;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.transport.ssh;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.nls;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util;version="[6.4.0,6.5.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 406a56d..5e9ace0 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: 6.3.1.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.ssh.apache;version="6.3.1.qualifier";roots="."
+Bundle-Version: 6.4.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.ssh.apache;version="6.4.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.ssh.apache/pom.xml b/org.eclipse.jgit.ssh.apache/pom.xml
index 3a97b3a..0c25364 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.ssh.apache</artifactId>
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 5a47db3..cdc9a75 100644
--- a/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF
@@ -3,18 +3,18 @@
 Bundle-Name: %Bundle-Name
 Automatic-Module-Name: org.eclipse.jgit.ssh.jsch.test
 Bundle-SymbolicName: org.eclipse.jgit.ssh.jsch.test
-Bundle-Version: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: JavaSE-11
 Import-Package: com.jcraft.jsch;version="[0.1.54,0.2.0)",
- org.eclipse.jgit.errors;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.junit;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.junit.ssh;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lib;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport.ssh.jsch;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util;version="[6.3.1,6.4.0)",
+ org.eclipse.jgit.errors;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.junit;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.junit.ssh;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lib;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport.ssh.jsch;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util;version="[6.4.0,6.5.0)",
  org.hamcrest;version="[1.1.0,3.0.0)",
  org.junit;version="[4.13,5.0.0)",
  org.junit.experimental.theories;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 2d5b023..6cc3a64 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.ssh.jsch.test</artifactId>
diff --git a/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF
index 18cb794..e675172 100644
--- a/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF
@@ -3,19 +3,19 @@
 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="[6.3.1,6.4.0)"
+Fragment-Host: org.eclipse.jgit;bundle-version="[6.4.0,6.5.0)"
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
 Bundle-ActivationPolicy: lazy
-Bundle-Version: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-11
-Export-Package: org.eclipse.jgit.transport.ssh.jsch;version="6.3.1"
+Export-Package: org.eclipse.jgit.transport.ssh.jsch;version="6.4.0"
 Import-Package: com.jcraft.jsch;version="[0.1.37,0.2.0)",
- org.eclipse.jgit.errors;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.transport.ssh;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.nls;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util.io;version="[6.3.1,6.4.0)",
+ org.eclipse.jgit.errors;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.transport.ssh;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.nls;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util.io;version="[6.4.0,6.5.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 4ecfbe7..3e7fb64 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: 6.3.1.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.ssh.jsch;version="6.3.1.qualifier";roots="."
+Bundle-Version: 6.4.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.ssh.jsch;version="6.4.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.ssh.jsch/pom.xml b/org.eclipse.jgit.ssh.jsch/pom.xml
index d1d2391..89f1325 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.ssh.jsch</artifactId>
diff --git a/org.eclipse.jgit.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.test/META-INF/MANIFEST.MF
index 97fe1be..3ca9c84 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: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-Localization: plugin
 Bundle-Vendor: %Bundle-Vendor
 Bundle-RequiredExecutionEnvironment: JavaSE-11
@@ -16,62 +16,62 @@
  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="[6.3.1,6.4.0)",
- org.eclipse.jgit.api;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.api.errors;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.archive;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.attributes;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.awtui;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.blame;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.diff;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.dircache;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.errors;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.events;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.fnmatch;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.gitrepo;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.hooks;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.ignore;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.ignore.internal;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.diff;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.diffmergetool;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.fsck;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.revwalk;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.storage.dfs;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.storage.file;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.storage.io;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.storage.pack;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.storage.reftable;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.transport.connectivity;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.transport.http;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.transport.parser;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.internal.transport.ssh;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.junit;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.junit.time;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lfs;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lib;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lib.internal;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.logging;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.merge;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.nls;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.notes;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.patch;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.pgm;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.pgm.internal;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.revplot;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.revwalk;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.revwalk.filter;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.storage.file;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.storage.pack;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.submodule;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport.http;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport.resolver;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.treewalk;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.treewalk.filter;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util.io;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util.sha1;version="[6.3.1,6.4.0)",
+ org.eclipse.jgit.annotations;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.api;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.api.errors;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.archive;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.attributes;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.awtui;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.blame;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.diff;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.dircache;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.errors;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.events;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.fnmatch;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.gitrepo;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.hooks;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.ignore;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.ignore.internal;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.diff;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.diffmergetool;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.fsck;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.revwalk;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.storage.dfs;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.storage.file;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.storage.io;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.storage.pack;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.storage.reftable;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.transport.connectivity;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.transport.http;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.transport.parser;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.internal.transport.ssh;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.junit;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.junit.time;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lfs;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lib;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lib.internal;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.logging;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.merge;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.nls;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.notes;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.patch;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.pgm;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.pgm.internal;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.revplot;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.revwalk;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.revwalk.filter;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.storage.file;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.storage.pack;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.submodule;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport.http;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport.resolver;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.treewalk;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.treewalk.filter;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util.io;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util.sha1;version="[6.4.0,6.5.0)",
  org.hamcrest;version="[1.1.0,3.0.0)",
  org.hamcrest.collection;version="[1.1.0,3.0.0)",
  org.junit;version="[4.13,5.0.0)",
diff --git a/org.eclipse.jgit.test/pom.xml b/org.eclipse.jgit.test/pom.xml
index 3eb762f..54cf540 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>org.eclipse.jgit.test</artifactId>
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 40764b7..a746823 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
@@ -19,19 +19,13 @@
 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.FS;
 import org.eclipse.jgit.util.IO;
 import org.junit.Test;
@@ -68,189 +62,6 @@ private ApplyResult init(final String name, final boolean preExists,
 		}
 	}
 
-	@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);
@@ -280,21 +91,6 @@ private void checkBinary(String name, boolean hasPreImage,
 	}
 
 	@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
@@ -410,188 +206,6 @@ public void testAddM1() throws Exception {
 				b.getString(0, b.size(), false));
 	}
 
-	@Test
-	public void testModifyM2() throws Exception {
-		ApplyResult result = init("M2", true, true);
-		assertEquals(1, result.getUpdatedFiles().size());
-		if (FS.DETECTED.supportsExecute()) {
-			assertTrue(FS.DETECTED.canExecute(result.getUpdatedFiles().get(0)));
-		}
-		checkFile(new File(db.getWorkTree(), "M2"),
-				b.getString(0, b.size(), false));
-	}
-
-	@Test
-	public void testModifyM3() throws Exception {
-		ApplyResult result = init("M3", true, true);
-		assertEquals(1, result.getUpdatedFiles().size());
-		if (FS.DETECTED.supportsExecute()) {
-			assertFalse(
-					FS.DETECTED.canExecute(result.getUpdatedFiles().get(0)));
-		}
-		checkFile(new File(db.getWorkTree(), "M3"),
-				b.getString(0, b.size(), false));
-	}
-
-	@Test
-	public void testModifyX() throws Exception {
-		ApplyResult result = init("X");
-		assertEquals(1, result.getUpdatedFiles().size());
-		assertEquals(new File(db.getWorkTree(), "X"), result.getUpdatedFiles()
-				.get(0));
-		checkFile(new File(db.getWorkTree(), "X"),
-				b.getString(0, b.size(), false));
-	}
-
-	@Test
-	public void testModifyY() throws Exception {
-		ApplyResult result = init("Y");
-		assertEquals(1, result.getUpdatedFiles().size());
-		assertEquals(new File(db.getWorkTree(), "Y"), result.getUpdatedFiles()
-				.get(0));
-		checkFile(new File(db.getWorkTree(), "Y"),
-				b.getString(0, b.size(), false));
-	}
-
-	@Test
-	public void testModifyZ() throws Exception {
-		ApplyResult result = init("Z");
-		assertEquals(1, result.getUpdatedFiles().size());
-		assertEquals(new File(db.getWorkTree(), "Z"), result.getUpdatedFiles()
-				.get(0));
-		checkFile(new File(db.getWorkTree(), "Z"),
-				b.getString(0, b.size(), false));
-	}
-
-	@Test
-	public void testModifyNL1() throws Exception {
-		ApplyResult result = init("NL1");
-		assertEquals(1, result.getUpdatedFiles().size());
-		assertEquals(new File(db.getWorkTree(), "NL1"), result
-				.getUpdatedFiles().get(0));
-		checkFile(new File(db.getWorkTree(), "NL1"),
-				b.getString(0, b.size(), false));
-	}
-
-	@Test
-	public void testNonASCII() throws Exception {
-		ApplyResult result = init("NonASCII");
-		assertEquals(1, result.getUpdatedFiles().size());
-		assertEquals(new File(db.getWorkTree(), "NonASCII"),
-				result.getUpdatedFiles().get(0));
-		checkFile(new File(db.getWorkTree(), "NonASCII"),
-				b.getString(0, b.size(), false));
-	}
-
-	@Test
-	public void testNonASCII2() throws Exception {
-		ApplyResult result = init("NonASCII2");
-		assertEquals(1, result.getUpdatedFiles().size());
-		assertEquals(new File(db.getWorkTree(), "NonASCII2"),
-				result.getUpdatedFiles().get(0));
-		checkFile(new File(db.getWorkTree(), "NonASCII2"),
-				b.getString(0, b.size(), false));
-	}
-
-	@Test
-	public void testNonASCIIAdd() throws Exception {
-		ApplyResult result = init("NonASCIIAdd");
-		assertEquals(1, result.getUpdatedFiles().size());
-		assertEquals(new File(db.getWorkTree(), "NonASCIIAdd"),
-				result.getUpdatedFiles().get(0));
-		checkFile(new File(db.getWorkTree(), "NonASCIIAdd"),
-				b.getString(0, b.size(), false));
-	}
-
-	@Test
-	public void testNonASCIIAdd2() throws Exception {
-		ApplyResult result = init("NonASCIIAdd2", false, true);
-		assertEquals(1, result.getUpdatedFiles().size());
-		assertEquals(new File(db.getWorkTree(), "NonASCIIAdd2"),
-				result.getUpdatedFiles().get(0));
-		checkFile(new File(db.getWorkTree(), "NonASCIIAdd2"),
-				b.getString(0, b.size(), false));
-	}
-
-	@Test
-	public void testNonASCIIDel() throws Exception {
-		ApplyResult result = init("NonASCIIDel", true, false);
-		assertEquals(1, result.getUpdatedFiles().size());
-		assertEquals(new File(db.getWorkTree(), "NonASCIIDel"),
-				result.getUpdatedFiles().get(0));
-		assertFalse(new File(db.getWorkTree(), "NonASCIIDel").exists());
-	}
-
-	@Test
-	public void testRenameNoHunks() throws Exception {
-		ApplyResult result = init("RenameNoHunks", true, true);
-		assertEquals(2, result.getUpdatedFiles().size());
-		assertTrue(result.getUpdatedFiles().contains(new File(db.getWorkTree(), "RenameNoHunks")));
-		assertTrue(result.getUpdatedFiles().contains(new File(db.getWorkTree(), "nested/subdir/Renamed")));
-		checkFile(new File(db.getWorkTree(), "nested/subdir/Renamed"),
-				b.getString(0, b.size(), false));
-	}
-
-	@Test
-	public void testRenameWithHunks() throws Exception {
-		ApplyResult result = init("RenameWithHunks", true, true);
-		assertEquals(2, result.getUpdatedFiles().size());
-		assertTrue(result.getUpdatedFiles().contains(new File(db.getWorkTree(), "RenameWithHunks")));
-		assertTrue(result.getUpdatedFiles().contains(new File(db.getWorkTree(), "nested/subdir/Renamed")));
-		checkFile(new File(db.getWorkTree(), "nested/subdir/Renamed"),
-				b.getString(0, b.size(), false));
-	}
-
-	@Test
-	public void testCopyWithHunks() throws Exception {
-		ApplyResult result = init("CopyWithHunks", true, true);
-		assertEquals(1, result.getUpdatedFiles().size());
-		assertEquals(new File(db.getWorkTree(), "CopyResult"), result.getUpdatedFiles()
-				.get(0));
-		checkFile(new File(db.getWorkTree(), "CopyResult"),
-				b.getString(0, b.size(), false));
-	}
-
-	@Test
-	public void testShiftUp() throws Exception {
-		ApplyResult result = init("ShiftUp");
-		assertEquals(1, result.getUpdatedFiles().size());
-		assertEquals(new File(db.getWorkTree(), "ShiftUp"),
-				result.getUpdatedFiles().get(0));
-		checkFile(new File(db.getWorkTree(), "ShiftUp"),
-				b.getString(0, b.size(), false));
-	}
-
-	@Test
-	public void testShiftUp2() throws Exception {
-		ApplyResult result = init("ShiftUp2");
-		assertEquals(1, result.getUpdatedFiles().size());
-		assertEquals(new File(db.getWorkTree(), "ShiftUp2"),
-				result.getUpdatedFiles().get(0));
-		checkFile(new File(db.getWorkTree(), "ShiftUp2"),
-				b.getString(0, b.size(), false));
-	}
-
-	@Test
-	public void testShiftDown() throws Exception {
-		ApplyResult result = init("ShiftDown");
-		assertEquals(1, result.getUpdatedFiles().size());
-		assertEquals(new File(db.getWorkTree(), "ShiftDown"),
-				result.getUpdatedFiles().get(0));
-		checkFile(new File(db.getWorkTree(), "ShiftDown"),
-				b.getString(0, b.size(), false));
-	}
-
-	@Test
-	public void testShiftDown2() throws Exception {
-		ApplyResult result = init("ShiftDown2");
-		assertEquals(1, result.getUpdatedFiles().size());
-		assertEquals(new File(db.getWorkTree(), "ShiftDown2"),
-				result.getUpdatedFiles().get(0));
-		checkFile(new File(db.getWorkTree(), "ShiftDown2"),
-				b.getString(0, b.size(), false));
-	}
-
 	private static byte[] readFile(String patchFile) throws IOException {
 		final InputStream in = getTestResource(patchFile);
 		if (in == null) {
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java
index 6053c8c..63ab809 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java
@@ -9,8 +9,10 @@
  */
 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.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
@@ -121,9 +123,32 @@ public void testCloneRepository() throws IOException,
 	}
 
 	@Test
-	public void testCloneRepository_refLogForLocalRefs()
+	public void testCloneRepositoryNoCheckout()
 			throws IOException, JGitInternalException, GitAPIException {
-		File directory = createTempDirectory("testCloneRepository");
+		File directory = createTempDirectory("testCloneRepositoryNoCheckout");
+		CloneCommand command = Git.cloneRepository();
+		command.setDirectory(directory);
+		command.setURI(fileUri());
+		command.setNoCheckout(true);
+		try (Git git2 = command.call()) {
+			Repository clonedRepo = git2.getRepository();
+			Ref main = clonedRepo.exactRef(Constants.R_HEADS + "test");
+			assertNotNull(main);
+			ObjectId id = main.getObjectId();
+			assertNotNull(id);
+			assertNotEquals(id, ObjectId.zeroId());
+			ObjectId headId = clonedRepo.resolve(Constants.HEAD);
+			assertEquals(id, headId);
+			assertArrayEquals(new String[] { Constants.DOT_GIT },
+					directory.list());
+		}
+	}
+
+	@Test
+	public void testCloneRepositoryRefLogForLocalRefs()
+			throws IOException, JGitInternalException, GitAPIException {
+		File directory = createTempDirectory(
+				"testCloneRepositoryRefLogForLocalRefs");
 		CloneCommand command = Git.cloneRepository();
 		command.setDirectory(directory);
 		command.setURI(fileUri());
@@ -331,7 +356,8 @@ public void testCloneRepositoryWithBranch() throws IOException,
 				allRefNames(git2.branchList().setListMode(ListMode.ALL).call()));
 
 		// Same thing, but now without checkout
-		directory = createTempDirectory("testCloneRepositoryWithBranch_bare");
+		directory = createTempDirectory(
+				"testCloneRepositoryWithBranch_noCheckout");
 		command = Git.cloneRepository();
 		command.setBranch("refs/heads/master");
 		command.setDirectory(directory);
@@ -341,7 +367,8 @@ public void testCloneRepositoryWithBranch() throws IOException,
 		addRepoToClose(git2.getRepository());
 
 		assertEquals(git2.getRepository().getFullBranch(), "refs/heads/master");
-		assertEquals("refs/remotes/origin/master, refs/remotes/origin/test",
+		assertEquals(
+				"refs/heads/master, refs/remotes/origin/master, refs/remotes/origin/test",
 				allRefNames(git2.branchList().setListMode(ListMode.ALL).call()));
 
 		// Same thing, but now test with bare repo
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsBundleWriterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsBundleWriterTest.java
index 4238ee6..bce62b9 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsBundleWriterTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsBundleWriterTest.java
@@ -19,6 +19,8 @@
 import java.util.Collections;
 import java.util.Set;
 
+import org.eclipse.jgit.api.GarbageCollectCommand;
+import org.eclipse.jgit.api.Git;
 import org.eclipse.jgit.junit.TestRepository;
 import org.eclipse.jgit.lib.NullProgressMonitor;
 import org.eclipse.jgit.lib.Ref;
@@ -44,7 +46,7 @@ public void setUp() throws IOException {
 	}
 
 	@Test
-	public void testRepo() throws Exception {
+	public void makeBundle_containsUnreferencedObject() throws Exception {
 		RevCommit commit0 = git.commit().message("0").create();
 		RevCommit commit1 = git.commit().message("1").parent(commit0).create();
 		git.update("master", commit1);
@@ -64,6 +66,31 @@ public void testRepo() throws Exception {
 		}
 	}
 
+	@Test
+	public void makeBundle_containsObjectInGcRestPack() throws Exception {
+		RevCommit commit0 = git.commit().message("0").create();
+		RevCommit commit1 = git.commit().message("1").parent(commit0).create();
+		git.update("master", commit1);
+
+		RevCommit commit2 = git.commit().message("0").create();
+
+		// This moves unreachable commit2 to GC_REST pack.
+		GarbageCollectCommand gc = Git.wrap(repo).gc();
+		gc.call();
+
+		byte[] bundle = makeBundle();
+		try (Repository newRepo = new InMemoryRepository(
+				new DfsRepositoryDescription("copy"))) {
+			fetchFromBundle(newRepo, bundle);
+			Ref ref = newRepo.exactRef("refs/heads/master");
+			assertNotNull(ref);
+			assertEquals(commit1.toObjectId(), ref.getObjectId());
+
+			// Unreferenced objects in GC_REST pack are included as well.
+			assertTrue(newRepo.getObjectDatabase().has(commit2));
+		}
+	}
+
 	private byte[] makeBundle() throws IOException {
 		ByteArrayOutputStream out = new ByteArrayOutputStream();
 		DfsBundleWriter.writeEntireRepositoryAsBundle(
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchApplierTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchApplierTest.java
new file mode 100644
index 0000000..c77a19f
--- /dev/null
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchApplierTest.java
@@ -0,0 +1,534 @@
+/*
+ * Copyright (C) 2022, 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
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package org.eclipse.jgit.patch;
+
+import static org.eclipse.jgit.lib.Constants.OBJ_BLOB;
+import static org.junit.Assert.assertArrayEquals;
+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 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.Git;
+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.junit.RepositoryTestCase;
+import org.eclipse.jgit.junit.TestRepository;
+import org.eclipse.jgit.lib.Config;
+import org.eclipse.jgit.lib.ConfigConstants;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.ObjectInserter;
+import org.eclipse.jgit.patch.PatchApplier.Result;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.revwalk.RevTree;
+import org.eclipse.jgit.revwalk.RevWalk;
+import org.eclipse.jgit.treewalk.TreeWalk;
+import org.eclipse.jgit.util.FS;
+import org.eclipse.jgit.util.IO;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ 		PatchApplierTest.WithWorktree. class, //
+		PatchApplierTest.InCore.class, //
+})
+public class PatchApplierTest {
+
+	public abstract static class Base extends RepositoryTestCase {
+
+		protected String name;
+
+		/** data before patching. */
+		protected byte[] preImage;
+		/** expected data after patching. */
+		protected byte[] postImage;
+
+		protected String expectedText;
+		protected RevTree baseTip;
+		public boolean inCore;
+
+		Base(boolean inCore) {
+			this.inCore = inCore;
+		}
+
+		protected void init(final String name, final boolean preExists,
+				final boolean postExists) throws Exception {
+			/* Patch and pre/postimage are read from data org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ */
+			this.name = name;
+			if (postExists) {
+				postImage = IO
+						.readWholeStream(getTestResource(name + "_PostImage"), 0)
+						.array();
+				expectedText = new String(postImage, StandardCharsets.UTF_8);
+			}
+
+			File f = new File(db.getWorkTree(), name);
+			if (preExists) {
+				preImage = IO
+						.readWholeStream(getTestResource(name + "_PreImage"), 0)
+						.array();
+				try (Git git = new Git(db)) {
+					Files.write(f.toPath(), preImage);
+					git.add().addFilepattern(name).call();
+				}
+			}
+			try (Git git = new Git(db)) {
+				RevCommit base = git.commit().setMessage("PreImage").call();
+				baseTip = base.getTree();
+			}
+		}
+
+		void init(final String name) throws Exception {
+			init(name, true, true);
+		}
+
+		protected Result applyPatch()
+				throws PatchApplyException, PatchFormatException, IOException {
+			InputStream patchStream = getTestResource(name + ".patch");
+			if (inCore) {
+				try (ObjectInserter oi = db.newObjectInserter()) {
+					return new PatchApplier(db, baseTip, oi).applyPatch(patchStream);
+				}
+			}
+			return new PatchApplier(db).applyPatch(patchStream);
+		}
+
+		protected static InputStream getTestResource(String patchFile) {
+			return PatchApplierTest.class.getClassLoader()
+					.getResourceAsStream("org/eclipse/jgit/diff/" + patchFile);
+		}
+		void verifyChange(Result result, String name) throws Exception {
+			verifyChange(result, name, true);
+		}
+
+		protected void verifyContent(Result result, String path, boolean exists) throws Exception {
+			if (inCore) {
+				byte[] output = readBlob(result.getTreeId(), path);
+				if (!exists)
+					assertNull(output);
+				else {
+					assertNotNull(output);
+					assertEquals(new String(output, StandardCharsets.UTF_8), expectedText);
+				}
+			} else {
+				File f = new File(db.getWorkTree(), path);
+				if (!exists)
+					assertFalse(f.exists());
+				else
+					checkFile(f, expectedText);
+			}
+		}
+
+		void verifyChange(Result result, String name, boolean exists) throws Exception {
+			assertEquals(1, result.getPaths().size());
+			verifyContent(result, name, exists);
+		}
+
+		protected byte[] readBlob(ObjectId treeish, String path) throws Exception {
+			try (TestRepository<?> tr = new TestRepository<>(db);
+					RevWalk rw = tr.getRevWalk()) {
+				db.incrementOpen();
+				RevTree tree = rw.parseTree(treeish);
+				try (TreeWalk tw = TreeWalk.forPath(db,path,tree)){
+					if (tw == null) {
+						return null;
+					}
+					return tw.getObjectReader().open(tw.getObjectId(0), OBJ_BLOB).getBytes();
+				}
+			}
+		}
+
+		protected void checkBinary(Result result, int numberOfFiles) throws Exception {
+			assertEquals(numberOfFiles, result.getPaths().size());
+			if (inCore) {
+				assertArrayEquals(postImage, readBlob(result.getTreeId(), result.getPaths().get(0)));
+			} else {
+				File f = new File(db.getWorkTree(), name);
+				assertArrayEquals(postImage, Files.readAllBytes(f.toPath()));
+			}
+		}
+
+		/* tests */
+
+		@Test
+		public void testBinaryDelta() throws Exception {
+			init("delta");
+			checkBinary(applyPatch(), 1);
+		}
+
+		@Test
+		public void testBinaryLiteral() throws Exception {
+			init("literal");
+			checkBinary(applyPatch(), 1);
+		}
+
+		@Test
+		public void testBinaryLiteralAdd() throws Exception {
+			init("literal_add", false, true);
+			checkBinary(applyPatch(), 1);
+		}
+
+		@Test
+		public void testModifyM2() throws Exception {
+			init("M2", true, true);
+
+			Result result = applyPatch();
+
+			if (!inCore && FS.DETECTED.supportsExecute()) {
+				assertEquals(1, result.getPaths().size());
+				File f = new File(db.getWorkTree(), result.getPaths().get(0));
+				assertTrue(FS.DETECTED.canExecute(f));
+			}
+
+			verifyChange(result, "M2");
+		}
+
+		@Test
+		public void testModifyM3() throws Exception {
+			init("M3", true, true);
+
+			Result result = applyPatch();
+
+			verifyChange(result, "M3");
+			if (!inCore && FS.DETECTED.supportsExecute()) {
+				File f = new File(db.getWorkTree(), result.getPaths().get(0));
+				assertFalse(FS.DETECTED.canExecute(f));
+			}
+		}
+
+		@Test
+		public void testModifyX() throws Exception {
+			init("X");
+
+			Result result = applyPatch();
+			verifyChange(result, "X");
+		}
+
+		@Test
+		public void testModifyY() throws Exception {
+			init("Y");
+
+			Result result = applyPatch();
+
+			verifyChange(result, "Y");
+		}
+
+		@Test
+		public void testModifyZ() throws Exception {
+			init("Z");
+
+			Result result = applyPatch();
+			verifyChange(result, "Z");
+		}
+
+		@Test
+		public void testNonASCII() throws Exception {
+			init("NonASCII");
+
+			Result result = applyPatch();
+			verifyChange(result, "NonASCII");
+		}
+
+		@Test
+		public void testNonASCII2() throws Exception {
+			init("NonASCII2");
+
+			Result result = applyPatch();
+			verifyChange(result, "NonASCII2");
+		}
+
+		@Test
+		public void testNonASCIIAdd() throws Exception {
+			init("NonASCIIAdd");
+
+			Result result = applyPatch();
+			verifyChange(result, "NonASCIIAdd");
+		}
+
+		@Test
+		public void testNonASCIIAdd2() throws Exception {
+			init("NonASCIIAdd2", false, true);
+
+			Result result = applyPatch();
+			verifyChange(result, "NonASCIIAdd2");
+		}
+
+		@Test
+		public void testNonASCIIDel() throws Exception {
+			init("NonASCIIDel", true, false);
+
+			Result result = applyPatch();
+			verifyChange(result, "NonASCIIDel", false);
+			assertEquals("NonASCIIDel", result.getPaths().get(0));
+		}
+
+		@Test
+		public void testRenameNoHunks() throws Exception {
+			init("RenameNoHunks", true, true);
+
+			Result result = applyPatch();
+
+			assertEquals(2, result.getPaths().size());
+			assertTrue(result.getPaths().contains("RenameNoHunks"));
+			assertTrue(result.getPaths().contains("nested/subdir/Renamed"));
+
+			verifyContent(result,"nested/subdir/Renamed", true);
+		}
+
+		@Test
+		public void testRenameWithHunks() throws Exception {
+			init("RenameWithHunks", true, true);
+
+			Result result = applyPatch();
+			assertEquals(2, result.getPaths().size());
+			assertTrue(result.getPaths().contains("RenameWithHunks"));
+			assertTrue(result.getPaths().contains("nested/subdir/Renamed"));
+
+			verifyContent(result,"nested/subdir/Renamed", true);
+		}
+
+		@Test
+		public void testCopyWithHunks() throws Exception {
+			init("CopyWithHunks", true, true);
+
+			Result result = applyPatch();
+			verifyChange(result, "CopyResult", true);
+		}
+
+		@Test
+		public void testShiftUp() throws Exception {
+			init("ShiftUp");
+
+			Result result = applyPatch();
+			verifyChange(result, "ShiftUp");
+		}
+
+		@Test
+		public void testShiftUp2() throws Exception {
+			init("ShiftUp2");
+
+			Result result = applyPatch();
+			verifyChange(result, "ShiftUp2");
+		}
+
+		@Test
+		public void testShiftDown() throws Exception {
+			init("ShiftDown");
+
+			Result result = applyPatch();
+			verifyChange(result, "ShiftDown");
+		}
+
+		@Test
+		public void testShiftDown2() throws Exception {
+			init("ShiftDown2");
+
+			Result result = applyPatch();
+			verifyChange(result, "ShiftDown2");
+		}
+	}
+
+	public static class InCore extends Base {
+
+		public InCore() {
+			super(true);
+		}
+	}
+
+	public static class WithWorktree extends Base {
+		public WithWorktree() { super(false); }
+
+		@Test
+		public void testModifyNL1() throws Exception {
+			init("NL1");
+
+			Result result = applyPatch();
+			verifyChange(result, "NL1");
+		}
+
+		@Test
+		public void testCrLf() throws Exception {
+			try {
+				db.getConfig().setBoolean(ConfigConstants.CONFIG_CORE_SECTION, null,
+						ConfigConstants.CONFIG_KEY_AUTOCRLF, true);
+				init("crlf", true, true);
+
+				Result result = applyPatch();
+
+				verifyChange(result, "crlf");
+			} 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);
+				init("crlf", true, true);
+
+				Result result = applyPatch();
+
+				verifyChange(result, "crlf");
+			} 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);
+				init("crlf3", true, true);
+
+				Result result = applyPatch();
+
+				verifyChange(result, "crlf3");
+			} 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);
+				init("crlf4", false, true);
+
+				Result result = applyPatch();
+
+				verifyChange(result, "crlf4");
+			} 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);
+				init("crlf2", true, true);
+
+				Result result = applyPatch();
+
+				verifyChange(result, "crlf2");
+			} 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);
+				init(name, true, true);
+				db.getConfig().setBoolean(ConfigConstants.CONFIG_CORE_SECTION, null,
+						ConfigConstants.CONFIG_KEY_AUTOCRLF, true);
+
+				Result result = applyPatch();
+
+				verifyChange(result, name);
+			} 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) -> new ReplaceFilter(in, out, 'A', 'E');
+			FilterCommandFactory smudge = (repo, in, out) -> new ReplaceFilter(in, out, 'E', 'A');
+			FilterCommandRegistry.register("jgit://builtin/a2e/clean", clean);
+			FilterCommandRegistry.register("jgit://builtin/a2e/smudge", smudge);
+			Config config = db.getConfig();
+			try (Git git = new Git(db)) {
+				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();
+				init("smudgetest", true, true);
+
+				Result result = applyPatch();
+
+				verifyChange(result, name);
+			} finally {
+				config.unset(ConfigConstants.CONFIG_FILTER_SECTION, "a2e",
+						"clean");
+				config.unset(ConfigConstants.CONFIG_FILTER_SECTION, "a2e",
+						"smudge");
+				// Tear down filter
+				FilterCommandRegistry.unregister("jgit://builtin/a2e/clean");
+				FilterCommandRegistry.unregister("jgit://builtin/a2e/smudge");
+			}
+		}
+	}
+}
diff --git a/org.eclipse.jgit.ui/META-INF/MANIFEST.MF b/org.eclipse.jgit.ui/META-INF/MANIFEST.MF
index 3552ffb..d11b38f 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: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-Vendor: %Bundle-Vendor
 Bundle-RequiredExecutionEnvironment: JavaSE-11
-Export-Package: org.eclipse.jgit.awtui;version="6.3.1"
-Import-Package: org.eclipse.jgit.errors;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.lib;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.nls;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.revplot;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.revwalk;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.transport;version="[6.3.1,6.4.0)",
- org.eclipse.jgit.util;version="[6.3.1,6.4.0)"
+Export-Package: org.eclipse.jgit.awtui;version="6.4.0"
+Import-Package: org.eclipse.jgit.errors;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.lib;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.nls;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.revplot;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.revwalk;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.transport;version="[6.4.0,6.5.0)",
+ org.eclipse.jgit.util;version="[6.4.0,6.5.0)"
diff --git a/org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.ui/META-INF/SOURCE-MANIFEST.MF
index 147b1e4..d042497 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: 6.3.1.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.ui;version="6.3.1.qualifier";roots="."
+Bundle-Version: 6.4.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.ui;version="6.4.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.ui/pom.xml b/org.eclipse.jgit.ui/pom.xml
index fce6d4d..386b665 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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
deleted file mode 100644
index 11ca369..0000000
--- a/org.eclipse.jgit/.settings/.api_filters
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.jgit" version="2">
-    <resource path="src/org/eclipse/jgit/merge/ResolveMerger.java" type="org.eclipse.jgit.merge.ResolveMerger">
-        <filter id="336658481">
-            <message_arguments>
-                <message_argument value="org.eclipse.jgit.merge.ResolveMerger"/>
-                <message_argument value="workTreeUpdater"/>
-            </message_arguments>
-        </filter>
-        <filter id="338755678">
-            <message_arguments>
-                <message_argument value="org.eclipse.jgit.merge.ResolveMerger"/>
-                <message_argument value="builder"/>
-            </message_arguments>
-        </filter>
-        <filter id="338755678">
-            <message_arguments>
-                <message_argument value="org.eclipse.jgit.merge.ResolveMerger"/>
-                <message_argument value="implicitDirCache"/>
-            </message_arguments>
-        </filter>
-        <filter id="338755678">
-            <message_arguments>
-                <message_argument value="org.eclipse.jgit.merge.ResolveMerger"/>
-                <message_argument value="toBeCheckedOut"/>
-            </message_arguments>
-        </filter>
-        <filter id="338755678">
-            <message_arguments>
-                <message_argument value="org.eclipse.jgit.merge.ResolveMerger"/>
-                <message_argument value="toBeDeleted"/>
-            </message_arguments>
-        </filter>
-        <filter id="338755678">
-            <message_arguments>
-                <message_argument value="org.eclipse.jgit.merge.ResolveMerger"/>
-                <message_argument value="workingTreeOptions"/>
-            </message_arguments>
-        </filter>
-        <filter id="338792546">
-            <message_arguments>
-                <message_argument value="org.eclipse.jgit.merge.ResolveMerger"/>
-                <message_argument value="addCheckoutMetadata(Map&lt;String,DirCacheCheckout.CheckoutMetadata&gt;, String, Attributes)"/>
-            </message_arguments>
-        </filter>
-        <filter id="338792546">
-            <message_arguments>
-                <message_argument value="org.eclipse.jgit.merge.ResolveMerger"/>
-                <message_argument value="cleanUp()"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/jgit/transport/AwsRequestSignerV4.java" type="org.eclipse.jgit.transport.AwsRequestSignerV4">
-        <filter id="1108344834">
-            <message_arguments>
-                <message_argument value="5.13"/>
-                <message_argument value="6.3"/>
-                <message_argument value="org.eclipse.jgit.transport.AwsRequestSignerV4"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/jgit/util/HttpSupport.java" type="org.eclipse.jgit.util.HttpSupport">
-        <filter id="1141899266">
-            <message_arguments>
-                <message_argument value="5.13"/>
-                <message_argument value="6.3"/>
-                <message_argument value="urlEncode(String, boolean)"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/jgit/util/Paths.java" type="org.eclipse.jgit.util.Paths">
-        <filter id="337768515">
-            <message_arguments>
-                <message_argument value="org.eclipse.jgit.util.Paths"/>
-            </message_arguments>
-        </filter>
-    </resource>
-</component>
diff --git a/org.eclipse.jgit/META-INF/MANIFEST.MF b/org.eclipse.jgit/META-INF/MANIFEST.MF
index 307a801..2eb35de 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: 6.3.1.qualifier
+Bundle-Version: 6.4.0.qualifier
 Bundle-Localization: plugin
 Bundle-Vendor: %Bundle-Vendor
 Eclipse-ExtensibleAPI: true
-Export-Package: org.eclipse.jgit.annotations;version="6.3.1",
- org.eclipse.jgit.api;version="6.3.1";
+Export-Package: org.eclipse.jgit.annotations;version="6.4.0",
+ org.eclipse.jgit.api;version="6.4.0";
   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="6.3.1";
+ org.eclipse.jgit.api.errors;version="6.4.0";
   uses:="org.eclipse.jgit.lib,
    org.eclipse.jgit.errors",
- org.eclipse.jgit.attributes;version="6.3.1";
+ org.eclipse.jgit.attributes;version="6.4.0";
   uses:="org.eclipse.jgit.lib,
    org.eclipse.jgit.treewalk",
- org.eclipse.jgit.blame;version="6.3.1";
+ org.eclipse.jgit.blame;version="6.4.0";
   uses:="org.eclipse.jgit.lib,
    org.eclipse.jgit.revwalk,
    org.eclipse.jgit.treewalk.filter,
    org.eclipse.jgit.diff",
- org.eclipse.jgit.diff;version="6.3.1";
+ org.eclipse.jgit.diff;version="6.4.0";
   uses:="org.eclipse.jgit.lib,
    org.eclipse.jgit.attributes,
    org.eclipse.jgit.revwalk,
@@ -42,51 +42,51 @@
    org.eclipse.jgit.treewalk.filter,
    org.eclipse.jgit.treewalk,
    org.eclipse.jgit.util",
- org.eclipse.jgit.dircache;version="6.3.1";
+ org.eclipse.jgit.dircache;version="6.4.0";
   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="6.3.1";
+ org.eclipse.jgit.errors;version="6.4.0";
   uses:="org.eclipse.jgit.transport,
    org.eclipse.jgit.dircache,
    org.eclipse.jgit.lib,
    org.eclipse.jgit.internal.storage.pack",
- org.eclipse.jgit.events;version="6.3.1";
+ org.eclipse.jgit.events;version="6.4.0";
   uses:="org.eclipse.jgit.lib",
- org.eclipse.jgit.fnmatch;version="6.3.1",
- org.eclipse.jgit.gitrepo;version="6.3.1";
+ org.eclipse.jgit.fnmatch;version="6.4.0",
+ org.eclipse.jgit.gitrepo;version="6.4.0";
   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="6.3.1";x-internal:=true,
- org.eclipse.jgit.hooks;version="6.3.1";uses:="org.eclipse.jgit.lib",
- org.eclipse.jgit.ignore;version="6.3.1",
- org.eclipse.jgit.ignore.internal;version="6.3.1";
+ org.eclipse.jgit.gitrepo.internal;version="6.4.0";x-internal:=true,
+ org.eclipse.jgit.hooks;version="6.4.0";uses:="org.eclipse.jgit.lib",
+ org.eclipse.jgit.ignore;version="6.4.0",
+ org.eclipse.jgit.ignore.internal;version="6.4.0";
   x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.internal;version="6.3.1";
+ org.eclipse.jgit.internal;version="6.4.0";
   x-friends:="org.eclipse.jgit.test,
    org.eclipse.jgit.http.test",
- org.eclipse.jgit.internal.diff;version="6.3.1";
+ org.eclipse.jgit.internal.diff;version="6.4.0";
   x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.internal.diffmergetool;version="6.3.1";
+ org.eclipse.jgit.internal.diffmergetool;version="6.4.0";
   x-friends:="org.eclipse.jgit.test,
    org.eclipse.jgit.pgm.test,
    org.eclipse.jgit.pgm,
    org.eclipse.egit.ui",
- org.eclipse.jgit.internal.fsck;version="6.3.1";
+ org.eclipse.jgit.internal.fsck;version="6.4.0";
   x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.internal.revwalk;version="6.3.1";
+ org.eclipse.jgit.internal.revwalk;version="6.4.0";
   x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.internal.storage.dfs;version="6.3.1";
+ org.eclipse.jgit.internal.storage.dfs;version="6.4.0";
   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="6.3.1";
+ org.eclipse.jgit.internal.storage.file;version="6.4.0";
   x-friends:="org.eclipse.jgit.test,
    org.eclipse.jgit.junit,
    org.eclipse.jgit.junit.http,
@@ -95,32 +95,32 @@
    org.eclipse.jgit.pgm,
    org.eclipse.jgit.pgm.test,
    org.eclipse.jgit.ssh.apache",
- org.eclipse.jgit.internal.storage.io;version="6.3.1";
+ org.eclipse.jgit.internal.storage.io;version="6.4.0";
   x-friends:="org.eclipse.jgit.junit,
    org.eclipse.jgit.test,
    org.eclipse.jgit.pgm",
- org.eclipse.jgit.internal.storage.pack;version="6.3.1";
+ org.eclipse.jgit.internal.storage.pack;version="6.4.0";
   x-friends:="org.eclipse.jgit.junit,
    org.eclipse.jgit.test,
    org.eclipse.jgit.pgm",
- org.eclipse.jgit.internal.storage.reftable;version="6.3.1";
+ org.eclipse.jgit.internal.storage.reftable;version="6.4.0";
   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="6.3.1";x-internal:=true,
- org.eclipse.jgit.internal.transport.connectivity;version="6.3.1";
+ org.eclipse.jgit.internal.submodule;version="6.4.0";x-internal:=true,
+ org.eclipse.jgit.internal.transport.connectivity;version="6.4.0";
   x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.internal.transport.http;version="6.3.1";
+ org.eclipse.jgit.internal.transport.http;version="6.4.0";
   x-friends:="org.eclipse.jgit.test",
- org.eclipse.jgit.internal.transport.parser;version="6.3.1";
+ org.eclipse.jgit.internal.transport.parser;version="6.4.0";
   x-friends:="org.eclipse.jgit.http.server,
    org.eclipse.jgit.test",
- org.eclipse.jgit.internal.transport.ssh;version="6.3.1";
+ org.eclipse.jgit.internal.transport.ssh;version="6.4.0";
   x-friends:="org.eclipse.jgit.ssh.apache,
    org.eclipse.jgit.ssh.jsch,
    org.eclipse.jgit.test",
- org.eclipse.jgit.lib;version="6.3.1";
+ org.eclipse.jgit.lib;version="6.4.0";
   uses:="org.eclipse.jgit.transport,
    org.eclipse.jgit.util.sha1,
    org.eclipse.jgit.dircache,
@@ -134,12 +134,12 @@
    org.eclipse.jgit.util,
    org.eclipse.jgit.submodule,
    org.eclipse.jgit.util.time",
- org.eclipse.jgit.lib.internal;version="6.3.1";
+ org.eclipse.jgit.lib.internal;version="6.4.0";
   x-friends:="org.eclipse.jgit.test,
    org.eclipse.jgit.pgm,
    org.eclipse.egit.ui",
- org.eclipse.jgit.logging;version="6.3.1",
- org.eclipse.jgit.merge;version="6.3.1";
+ org.eclipse.jgit.logging;version="6.4.0",
+ org.eclipse.jgit.merge;version="6.4.0";
   uses:="org.eclipse.jgit.dircache,
    org.eclipse.jgit.lib,
    org.eclipse.jgit.revwalk,
@@ -148,40 +148,40 @@
    org.eclipse.jgit.util,
    org.eclipse.jgit.api,
    org.eclipse.jgit.attributes",
- org.eclipse.jgit.nls;version="6.3.1",
- org.eclipse.jgit.notes;version="6.3.1";
+ org.eclipse.jgit.nls;version="6.4.0",
+ org.eclipse.jgit.notes;version="6.4.0";
   uses:="org.eclipse.jgit.lib,
    org.eclipse.jgit.revwalk,
    org.eclipse.jgit.treewalk,
    org.eclipse.jgit.merge",
- org.eclipse.jgit.patch;version="6.3.1";
+ org.eclipse.jgit.patch;version="6.4.0";
   uses:="org.eclipse.jgit.lib,
    org.eclipse.jgit.diff",
- org.eclipse.jgit.revplot;version="6.3.1";
+ org.eclipse.jgit.revplot;version="6.4.0";
   uses:="org.eclipse.jgit.lib,
    org.eclipse.jgit.revwalk",
- org.eclipse.jgit.revwalk;version="6.3.1";
+ org.eclipse.jgit.revwalk;version="6.4.0";
   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="6.3.1";
+ org.eclipse.jgit.revwalk.filter;version="6.4.0";
   uses:="org.eclipse.jgit.revwalk,
    org.eclipse.jgit.lib,
    org.eclipse.jgit.util",
- org.eclipse.jgit.storage.file;version="6.3.1";
+ org.eclipse.jgit.storage.file;version="6.4.0";
   uses:="org.eclipse.jgit.lib,
    org.eclipse.jgit.util",
- org.eclipse.jgit.storage.pack;version="6.3.1";
+ org.eclipse.jgit.storage.pack;version="6.4.0";
   uses:="org.eclipse.jgit.lib",
- org.eclipse.jgit.submodule;version="6.3.1";
+ org.eclipse.jgit.submodule;version="6.4.0";
   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="6.3.1";
+ org.eclipse.jgit.transport;version="6.4.0";
   uses:="javax.crypto,
    org.eclipse.jgit.util.io,
    org.eclipse.jgit.lib,
@@ -194,21 +194,21 @@
    org.eclipse.jgit.transport.resolver,
    org.eclipse.jgit.storage.pack,
    org.eclipse.jgit.errors",
- org.eclipse.jgit.transport.http;version="6.3.1";
+ org.eclipse.jgit.transport.http;version="6.4.0";
   uses:="javax.net.ssl",
- org.eclipse.jgit.transport.resolver;version="6.3.1";
+ org.eclipse.jgit.transport.resolver;version="6.4.0";
   uses:="org.eclipse.jgit.transport,
    org.eclipse.jgit.lib",
- org.eclipse.jgit.treewalk;version="6.3.1";
+ org.eclipse.jgit.treewalk;version="6.4.0";
   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="6.3.1";
+ org.eclipse.jgit.treewalk.filter;version="6.4.0";
   uses:="org.eclipse.jgit.treewalk",
- org.eclipse.jgit.util;version="6.3.1";
+ org.eclipse.jgit.util;version="6.4.0";
   uses:="org.eclipse.jgit.transport,
    org.eclipse.jgit.hooks,
    org.eclipse.jgit.revwalk,
@@ -221,12 +221,12 @@
    org.eclipse.jgit.treewalk,
    javax.net.ssl,
    org.eclipse.jgit.util.time",
- org.eclipse.jgit.util.io;version="6.3.1";
+ org.eclipse.jgit.util.io;version="6.4.0";
   uses:="org.eclipse.jgit.attributes,
    org.eclipse.jgit.lib,
    org.eclipse.jgit.treewalk",
- org.eclipse.jgit.util.sha1;version="6.3.1",
- org.eclipse.jgit.util.time;version="6.3.1"
+ org.eclipse.jgit.util.sha1;version="6.4.0",
+ org.eclipse.jgit.util.time;version="6.4.0"
 Bundle-RequiredExecutionEnvironment: JavaSE-11
 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 43e88e5..619a0c6 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: 6.3.1.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit;version="6.3.1.qualifier";roots="."
+Bundle-Version: 6.4.0.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit;version="6.4.0.qualifier";roots="."
diff --git a/org.eclipse.jgit/pom.xml b/org.eclipse.jgit/pom.xml
index 7e6bc0a..62f5f9a 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>6.3.1-SNAPSHOT</version>
+    <version>6.4.0-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 f3ecadd..93269d5 100644
--- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
+++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
@@ -14,7 +14,9 @@
 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
+applyBinaryForInCoreNotSupported=Applying binary patch for inCore repositories is not yet supported
 applyBinaryOidTooShort=Binary patch for file {0} does not have full IDs
+applyBinaryPatchTypeNotSupported=Couldn't apply binary patch of type {0}
 applyBinaryResultOidWrong=Result of binary patch for file {0} has wrong OID.
 applyingCommit=Applying {0}
 archiveFormatAlreadyAbsent=Archive format already absent: {0}
@@ -155,6 +157,7 @@
 connectionTimeOut=Connection time out: {0}
 contextMustBeNonNegative=context must be >= 0
 cookieFilePathRelative=git config http.cookieFile contains a relative path, should be absolute: {0}
+copyFileFailedNullFiles=Cannot copy file. Either origin or destination files are null
 corruptionDetectedReReadingAt=Corruption detected re-reading at {0}
 corruptObjectBadDate=bad date
 corruptObjectBadEmail=bad email
@@ -627,6 +630,7 @@
 renameBranchUnexpectedResult=Unexpected rename result {0}
 renameCancelled=Rename detection was cancelled
 renameFileFailed=Could not rename file {0} to {1}
+renameFileFailedNullFiles=Cannot rename file. Either origin or destination files are null
 renamesAlreadyFound=Renames have already been found.
 renamesBreakingModifies=Breaking apart modified file pairs
 renamesFindingByContent=Finding renames by content similarity
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 e7f40d8..49f225f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java
@@ -9,62 +9,13 @@
  */
 package org.eclipse.jgit.api;
 
-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.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.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.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;
+import org.eclipse.jgit.patch.PatchApplier;
+import org.eclipse.jgit.patch.PatchApplier.Result;
 
 /**
  * Apply a patch to files and/or to the index.
@@ -80,10 +31,13 @@ public class ApplyCommand extends GitCommand<ApplyResult> {
 	/**
 	 * Constructs the command.
 	 *
-	 * @param repo
+	 * @param local
 	 */
-	ApplyCommand(Repository repo) {
-		super(repo);
+	ApplyCommand(Repository local) {
+		super(local);
+		if (local == null) {
+			throw new NullPointerException(JGitText.get().repositoryIsRequired);
+		}
 	}
 
 	/**
@@ -101,6 +55,7 @@ public ApplyCommand setPatch(InputStream in) {
 
 	/**
 	 * {@inheritDoc}
+	 *
 	 * <p>
 	 * Executes the {@code ApplyCommand} command with all the options and
 	 * parameters collected by the setter methods (e.g.
@@ -109,621 +64,15 @@ public ApplyCommand setPatch(InputStream in) {
 	 * method twice on an instance.
 	 */
 	@Override
-	public ApplyResult call() throws GitAPIException, PatchFormatException,
-			PatchApplyException {
+	public ApplyResult call() throws GitAPIException {
 		checkCallable();
 		setCallable(false);
 		ApplyResult r = new ApplyResult();
-		try {
-			final Patch p = new Patch();
-			try {
-				p.parse(in);
-			} finally {
-				in.close();
-			}
-			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(repository, fh.getNewPath(), cache, f, fh);
-					break;
-				case MODIFY:
-					f = getFile(fh.getOldPath(), false);
-					apply(repository, fh.getOldPath(), cache, f, fh);
-					break;
-				case DELETE:
-					f = getFile(fh.getOldPath(), false);
-					if (!f.delete())
-						throw new PatchApplyException(MessageFormat.format(
-								JGitText.get().cannotDeleteFile, f));
-					break;
-				case RENAME:
-					f = getFile(fh.getOldPath(), false);
-					File dest = getFile(fh.getNewPath(), false);
-					try {
-						FileUtils.mkdirs(dest.getParentFile(), true);
-						FileUtils.rename(f, dest,
-								StandardCopyOption.ATOMIC_MOVE);
-					} catch (IOException e) {
-						throw new PatchApplyException(MessageFormat.format(
-								JGitText.get().renameFileFailed, f, dest), e);
-					}
-					apply(repository, fh.getOldPath(), cache, dest, fh);
-					r.addUpdatedFile(dest);
-					break;
-				case COPY:
-					File src = getFile(fh.getOldPath(), false);
-					f = getFile(fh.getNewPath(), false);
-					FileUtils.mkdirs(f.getParentFile(), true);
-					Files.copy(src.toPath(), f.toPath());
-					apply(repository, fh.getOldPath(), cache, f, fh);
-				}
-				r.addUpdatedFile(f);
-			}
-		} catch (IOException e) {
-			throw new PatchApplyException(MessageFormat.format(
-					JGitText.get().patchApplyException, e.getMessage()), e);
+		PatchApplier patchApplier = new PatchApplier(repo);
+		Result applyResult = patchApplier.applyPatch(in);
+		for (String p : applyResult.getPaths()) {
+			r.addUpdatedFile(new File(repo.getWorkTree(), p));
 		}
 		return r;
 	}
-
-	private File getFile(String path, boolean create)
-			throws PatchApplyException {
-		File f = new File(getRepository().getWorkTree(), path);
-		if (create) {
-			try {
-				File parent = f.getParentFile();
-				FileUtils.mkdirs(parent, true);
-				FileUtils.createNewFile(f);
-			} catch (IOException e) {
-				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();
-	}
-
-	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, DirCacheCheckout.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,
-							() -> inflated, 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,
-								() -> hashed, 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 {
-		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;
-		for (HunkHeader hh : fh.getHunks()) {
-
-			// We assume hunks to be ordered
-			if (hh.getNewStartLine() <= lastHunkNewLine) {
-				throw new PatchApplyException(MessageFormat
-						.format(JGitText.get().patchApplyException, hh));
-			}
-			lastHunkNewLine = hh.getNewStartLine();
-
-			byte[] b = new byte[hh.getEndOffset() - hh.getStartOffset()];
-			System.arraycopy(hh.getBuffer(), hh.getStartOffset(), b, 0,
-					b.length);
-			RawText hrt = new RawText(b);
-
-			List<ByteBuffer> hunkLines = new ArrayList<>(hrt.size());
-			for (int i = 0; i < hrt.size(); i++) {
-				hunkLines.add(hrt.getRawString(i));
-			}
-
-			if (hh.getNewStartLine() == 0) {
-				// Must be the single hunk for clearing all content
-				if (fh.getHunks().size() == 1
-						&& canApplyAt(hunkLines, newLines, 0)) {
-					newLines.clear();
-					break;
-				}
-				throw new PatchApplyException(MessageFormat
-						.format(JGitText.get().patchApplyException, hh));
-			}
-			// Hunk lines as reported by the hunk may be off, so don't rely on
-			// them.
-			int applyAt = hh.getNewStartLine() - 1 + lineNumberShift;
-			// But they definitely should not go backwards.
-			if (applyAt < afterLastHunk && lineNumberShift < 0) {
-				applyAt = hh.getNewStartLine() - 1;
-				lineNumberShift = 0;
-			}
-			if (applyAt < afterLastHunk) {
-				throw new PatchApplyException(MessageFormat
-						.format(JGitText.get().patchApplyException, hh));
-			}
-			boolean applies = false;
-			int oldLinesInHunk = hh.getLinesContext()
-					+ hh.getOldImage().getLinesDeleted();
-			if (oldLinesInHunk <= 1) {
-				// Don't shift hunks without context lines. Just try the
-				// position corrected by the current lineNumberShift, and if
-				// that fails, the position recorded in the hunk header.
-				applies = canApplyAt(hunkLines, newLines, applyAt);
-				if (!applies && lineNumberShift != 0) {
-					applyAt = hh.getNewStartLine() - 1;
-					applies = applyAt >= afterLastHunk
-							&& canApplyAt(hunkLines, newLines, applyAt);
-				}
-			} else {
-				int maxShift = applyAt - afterLastHunk;
-				for (int shift = 0; shift <= maxShift; shift++) {
-					if (canApplyAt(hunkLines, newLines, applyAt - shift)) {
-						applies = true;
-						applyAt -= shift;
-						break;
-					}
-				}
-				if (!applies) {
-					// Try shifting the hunk downwards
-					applyAt = hh.getNewStartLine() - 1 + lineNumberShift;
-					maxShift = newLines.size() - applyAt - oldLinesInHunk;
-					for (int shift = 1; shift <= maxShift; shift++) {
-						if (canApplyAt(hunkLines, newLines, applyAt + shift)) {
-							applies = true;
-							applyAt += shift;
-							break;
-						}
-					}
-				}
-			}
-			if (!applies) {
-				throw new PatchApplyException(MessageFormat
-						.format(JGitText.get().patchApplyException, hh));
-			}
-			// Hunk applies at applyAt. Apply it, and update afterLastHunk and
-			// lineNumberShift
-			lineNumberShift = applyAt - hh.getNewStartLine() + 1;
-			int sz = hunkLines.size();
-			for (int j = 1; j < sz; j++) {
-				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;
-				case '-':
-					newLines.remove(applyAt);
-					break;
-				case '+':
-					newLines.add(applyAt++, slice(hunkLine, 1));
-					break;
-				default:
-					break;
-				}
-			}
-			afterLastHunk = applyAt;
-		}
-		if (!isNoNewlineAtEndOfFile(fh)) {
-			newLines.add(null);
-		}
-		if (!rt.isMissingNewlineAtEnd()) {
-			oldLines.add(null);
-		}
-		if (oldLines.equals(newLines)) {
-			return; // Unchanged; don't touch the file
-		}
-
-		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,
-						buffer::openInputStream, null, output);
-			}
-		} finally {
-			buffer.destroy();
-		}
-		repository.getFS().setExecute(f,
-				fh.getNewMode() == FileMode.EXECUTABLE_FILE);
-	}
-
-	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++) {
-			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(slice(hunkLine, 1))) {
-					return false;
-				}
-				pos++;
-				break;
-			default:
-				break;
-			}
-		}
-		return true;
-	}
-
-	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) {
-		List<? extends HunkHeader> hunks = fh.getHunks();
-		if (hunks == null || hunks.isEmpty()) {
-			return false;
-		}
-		HunkHeader lastHunk = hunks.get(hunks.size() - 1);
-		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/CloneCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java
index 1f979a9..107b00e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java
@@ -216,16 +216,14 @@ public Git call() throws GitAPIException, InvalidRemoteException,
 				// ignore - the VM is already shutting down
 			}
 		}
-		if (!noCheckout) {
-			try {
-				checkout(repository, fetchResult);
-			} catch (IOException ioe) {
-				repository.close();
-				throw new JGitInternalException(ioe.getMessage(), ioe);
-			} catch (GitAPIException | RuntimeException e) {
-				repository.close();
-				throw e;
-			}
+		try {
+			checkout(repository, fetchResult);
+		} catch (IOException ioe) {
+			repository.close();
+			throw new JGitInternalException(ioe.getMessage(), ioe);
+		} catch (GitAPIException | RuntimeException e) {
+			repository.close();
+			throw e;
 		}
 		return new Git(repository, true);
 	}
@@ -318,7 +316,9 @@ private FetchResult fetch(Repository clonedRepo, URIish u)
 		if (depth != null) {
 			command.setDepth(depth.intValue());
 		}
-		command.setShallowSince(shallowSince);
+		if (shallowSince != null) {
+			command.setShallowSince(shallowSince);
+		}
 		command.setShallowExcludes(shallowExcludes);
 		configure(command);
 
@@ -391,7 +391,7 @@ private void checkout(Repository clonedRepo, FetchResult result)
 		u.setNewObjectId(commit.getId());
 		u.forceUpdate();
 
-		if (!bare) {
+		if (!bare && !noCheckout) {
 			DirCache dc = clonedRepo.lockDirCache();
 			DirCacheCheckout co = new DirCacheCheckout(clonedRepo, dc,
 					commit.getTree());
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java
index 84bee36..e7a8be0 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java
@@ -227,7 +227,9 @@ public FetchResult call() throws GitAPIException, InvalidRemoteException,
 				}
 				transport.setDepth(Constants.INFINITE_DEPTH);
 			}
-			transport.setDeepenSince(deepenSince);
+			if (deepenSince != null) {
+				transport.setDeepenSince(deepenSince);
+			}
 			transport.setDeepenNots(shallowExcludes);
 			configure(transport);
 			FetchResult result = transport.fetch(monitor,
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 964debc..d89d689 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
@@ -42,7 +42,9 @@ public static JGitText get() {
 	/***/ public String anExceptionOccurredWhileTryingToAddTheIdOfHEAD;
 	/***/ public String anSSHSessionHasBeenAlreadyCreated;
 	/***/ public String applyBinaryBaseOidWrong;
+	/***/ public String applyBinaryForInCoreNotSupported;
 	/***/ public String applyBinaryOidTooShort;
+	/***/ public String applyBinaryPatchTypeNotSupported;
 	/***/ public String applyBinaryResultOidWrong;
 	/***/ public String applyingCommit;
 	/***/ public String archiveFormatAlreadyAbsent;
@@ -183,6 +185,7 @@ public static JGitText get() {
 	/***/ public String connectionTimeOut;
 	/***/ public String contextMustBeNonNegative;
 	/***/ public String cookieFilePathRelative;
+	/***/ public String copyFileFailedNullFiles;
 	/***/ public String corruptionDetectedReReadingAt;
 	/***/ public String corruptObjectBadDate;
 	/***/ public String corruptObjectBadEmail;
@@ -655,6 +658,7 @@ public static JGitText get() {
 	/***/ public String renameBranchUnexpectedResult;
 	/***/ public String renameCancelled;
 	/***/ public String renameFileFailed;
+	/***/ public String renameFileFailedNullFiles;
 	/***/ public String renamesAlreadyFound;
 	/***/ public String renamesBreakingModifies;
 	/***/ public String renamesFindingByContent;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
index 7699439..ff7ef93 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
@@ -724,14 +724,17 @@ public File fileFor(AnyObjectId objectId) {
 
 	static class AlternateHandle {
 		static class Id {
-			String alternateId;
+			private final String alternateId;
 
 			public Id(File object) {
+				String id = null;
 				try {
-					this.alternateId = object.getCanonicalPath();
-				} catch (Exception e) {
-					alternateId = null;
+					// resolve symbolic links to their final target:
+					id = object.toPath().toRealPath().normalize().toString();
+				} catch (Exception ignored) {
+					// id == null
 				}
+				this.alternateId = id;
 			}
 
 			@Override
@@ -757,6 +760,8 @@ public int hashCode() {
 
 		final ObjectDirectory db;
 
+		private AlternateHandle.Id id;
+
 		AlternateHandle(ObjectDirectory db) {
 			this.db = db;
 		}
@@ -765,8 +770,11 @@ void close() {
 			db.close();
 		}
 
-		public Id getId(){
-			return db.getAlternateId();
+		public synchronized Id getId() {
+			if (id == null) {
+				id = new AlternateHandle.Id(db.objects);
+			}
+			return id;
 		}
 	}
 
@@ -795,6 +803,6 @@ CachedObjectDirectory newCachedFileObjectDatabase() {
 	}
 
 	AlternateHandle.Id getAlternateId() {
-		return new AlternateHandle.Id(objects);
+		return handle.getId();
 	}
 }
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/patch/PatchApplier.java b/org.eclipse.jgit/src/org/eclipse/jgit/patch/PatchApplier.java
new file mode 100644
index 0000000..b9bf090
--- /dev/null
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/PatchApplier.java
@@ -0,0 +1,999 @@
+/*
+ * Copyright (C) 2022, 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
+ * https://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+package org.eclipse.jgit.patch;
+
+import static org.eclipse.jgit.lib.Constants.OBJ_BLOB;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.nio.ByteBuffer;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.StandardCopyOption;
+import java.text.MessageFormat;
+import java.time.Instant;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+import java.util.zip.InflaterInputStream;
+import org.eclipse.jgit.annotations.Nullable;
+import org.eclipse.jgit.api.errors.FilterFailedException;
+import org.eclipse.jgit.api.errors.PatchApplyException;
+import org.eclipse.jgit.api.errors.PatchFormatException;
+import org.eclipse.jgit.attributes.Attribute;
+import org.eclipse.jgit.attributes.Attributes;
+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.DirCacheBuilder;
+import org.eclipse.jgit.dircache.DirCacheCheckout;
+import org.eclipse.jgit.dircache.DirCacheCheckout.CheckoutMetadata;
+import org.eclipse.jgit.dircache.DirCacheCheckout.StreamSupplier;
+import org.eclipse.jgit.dircache.DirCacheEntry;
+import org.eclipse.jgit.dircache.DirCacheIterator;
+import org.eclipse.jgit.errors.IndexWriteException;
+import org.eclipse.jgit.internal.JGitText;
+import org.eclipse.jgit.lib.Config;
+import org.eclipse.jgit.lib.ConfigConstants;
+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.ObjectInserter;
+import org.eclipse.jgit.lib.ObjectLoader;
+import org.eclipse.jgit.lib.ObjectReader;
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.patch.FileHeader.PatchType;
+import org.eclipse.jgit.revwalk.RevTree;
+import org.eclipse.jgit.treewalk.FileTreeIterator;
+import org.eclipse.jgit.treewalk.TreeWalk;
+import org.eclipse.jgit.treewalk.TreeWalk.OperationType;
+import org.eclipse.jgit.treewalk.WorkingTreeOptions;
+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.ExecutionResult;
+import org.eclipse.jgit.util.FileUtils;
+import org.eclipse.jgit.util.IO;
+import org.eclipse.jgit.util.LfsFactory;
+import org.eclipse.jgit.util.LfsFactory.LfsInputStream;
+import org.eclipse.jgit.util.RawParseUtils;
+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;
+
+/**
+ * Applies a patch to files and the index.
+ * <p>
+ * After instantiating, applyPatch() should be called once.
+ * </p>
+ *
+ * @since 6.4
+ */
+public class PatchApplier {
+
+	/** The tree before applying the patch. Only non-null for inCore operation. */
+	@Nullable
+	private final RevTree beforeTree;
+
+	private final Repository repo;
+
+	private final ObjectInserter inserter;
+
+	private final ObjectReader reader;
+
+	private WorkingTreeOptions workingTreeOptions;
+
+	private int inCoreSizeLimit;
+
+	/**
+	 * @param repo
+	 *            repository to apply the patch in
+	 */
+	public PatchApplier(Repository repo) {
+		this.repo = repo;
+		inserter = repo.newObjectInserter();
+		reader = inserter.newReader();
+		beforeTree = null;
+
+		Config config = repo.getConfig();
+		workingTreeOptions = config.get(WorkingTreeOptions.KEY);
+		inCoreSizeLimit = config.getInt(ConfigConstants.CONFIG_MERGE_SECTION,
+				ConfigConstants.CONFIG_KEY_IN_CORE_LIMIT, 10 << 20);
+	}
+
+	/**
+	 * @param repo
+	 *            repository to apply the patch in
+	 * @param beforeTree
+	 *            ID of the tree to apply the patch in
+	 * @param oi
+	 *            to be used for modifying objects
+	 * @throws IOException
+	 *             in case of I/O errors
+	 */
+	public PatchApplier(Repository repo, RevTree beforeTree, ObjectInserter oi)
+			throws IOException {
+		this.repo = repo;
+		this.beforeTree = beforeTree;
+		inserter = oi;
+		reader = oi.newReader();
+	}
+
+	/**
+	 * A wrapper for returning both the applied tree ID and the applied files
+	 * list.
+	 *
+	 * @since 6.3
+	 */
+	public static class Result {
+
+		private ObjectId treeId;
+
+		private List<String> paths;
+
+		/**
+		 * @return List of modified paths.
+		 */
+		public List<String> getPaths() {
+			return paths;
+		}
+
+		/**
+		 * @return The applied tree ID.
+		 */
+		public ObjectId getTreeId() {
+			return treeId;
+		}
+	}
+
+	/**
+	 * Applies the given patch
+	 *
+	 * @param patchInput
+	 *            the patch to apply.
+	 * @return the result of the patch
+	 * @throws PatchFormatException
+	 *             if the patch cannot be parsed
+	 * @throws PatchApplyException
+	 *             if the patch cannot be applied
+	 */
+	public Result applyPatch(InputStream patchInput)
+			throws PatchFormatException, PatchApplyException {
+		Result result = new Result();
+		org.eclipse.jgit.patch.Patch p = new org.eclipse.jgit.patch.Patch();
+		try (InputStream inStream = patchInput) {
+			p.parse(inStream);
+
+			if (!p.getErrors().isEmpty()) {
+				throw new PatchFormatException(p.getErrors());
+			}
+
+			DirCache dirCache = (inCore()) ? DirCache.newInCore()
+					: repo.lockDirCache();
+
+			DirCacheBuilder dirCacheBuilder = dirCache.builder();
+			Set<String> modifiedPaths = new HashSet<>();
+			for (org.eclipse.jgit.patch.FileHeader fh : p.getFiles()) {
+				ChangeType type = fh.getChangeType();
+				switch (type) {
+				case ADD: {
+					File f = getFile(fh.getNewPath());
+					if (f != null) {
+						try {
+							FileUtils.mkdirs(f.getParentFile(), true);
+							FileUtils.createNewFile(f);
+						} catch (IOException e) {
+							throw new PatchApplyException(MessageFormat.format(
+									JGitText.get().createNewFileFailed, f), e);
+						}
+					}
+					apply(fh.getNewPath(), dirCache, dirCacheBuilder, f, fh);
+				}
+					break;
+				case MODIFY:
+					apply(fh.getOldPath(), dirCache, dirCacheBuilder,
+							getFile(fh.getOldPath()), fh);
+					break;
+				case DELETE:
+					if (!inCore()) {
+						File old = getFile(fh.getOldPath());
+						if (!old.delete())
+							throw new PatchApplyException(MessageFormat.format(
+									JGitText.get().cannotDeleteFile, old));
+					}
+					break;
+				case RENAME: {
+					File src = getFile(fh.getOldPath());
+					File dest = getFile(fh.getNewPath());
+
+					if (!inCore()) {
+						/*
+						 * this is odd: we rename the file on the FS, but
+						 * apply() will write a fresh stream anyway, which will
+						 * overwrite if there were hunks in the patch.
+						 */
+						try {
+							FileUtils.mkdirs(dest.getParentFile(), true);
+							FileUtils.rename(src, dest,
+									StandardCopyOption.ATOMIC_MOVE);
+						} catch (IOException e) {
+							throw new PatchApplyException(MessageFormat.format(
+									JGitText.get().renameFileFailed, src, dest),
+									e);
+						}
+					}
+					String pathWithOriginalContent = inCore() ?
+							fh.getOldPath() : fh.getNewPath();
+					apply(pathWithOriginalContent, dirCache, dirCacheBuilder, dest, fh);
+					break;
+				}
+				case COPY: {
+					File dest = getFile(fh.getNewPath());
+					if (!inCore()) {
+						File src = getFile(fh.getOldPath());
+						FileUtils.mkdirs(dest.getParentFile(), true);
+						Files.copy(src.toPath(), dest.toPath());
+					}
+					apply(fh.getOldPath(), dirCache, dirCacheBuilder, dest, fh);
+					break;
+				}
+				}
+				if (fh.getChangeType() != ChangeType.DELETE)
+					modifiedPaths.add(fh.getNewPath());
+				if (fh.getChangeType() != ChangeType.COPY
+						&& fh.getChangeType() != ChangeType.ADD)
+					modifiedPaths.add(fh.getOldPath());
+			}
+
+			// We processed the patch. Now add things that weren't changed.
+			for (int i = 0; i < dirCache.getEntryCount(); i++) {
+				DirCacheEntry dce = dirCache.getEntry(i);
+				if (!modifiedPaths.contains(dce.getPathString())
+						|| dce.getStage() != DirCacheEntry.STAGE_0)
+					dirCacheBuilder.add(dce);
+			}
+
+			if (inCore())
+				dirCacheBuilder.finish();
+			else if (!dirCacheBuilder.commit()) {
+				throw new IndexWriteException();
+			}
+
+			result.treeId = dirCache.writeTree(inserter);
+			result.paths = modifiedPaths.stream().sorted()
+					.collect(Collectors.toList());
+		} catch (IOException e) {
+			throw new PatchApplyException(MessageFormat.format(
+					JGitText.get().patchApplyException, e.getMessage()), e);
+		}
+		return result;
+	}
+
+	private File getFile(String path) {
+		return (inCore()) ? null : new File(repo.getWorkTree(), path);
+	}
+
+	/* returns null if the path is not found. */
+	@Nullable
+	private TreeWalk getTreeWalkForFile(String path, DirCache cache)
+			throws PatchApplyException {
+		try {
+			if (inCore()) {
+				// Only this branch may return null.
+				// TODO: it would be nice if we could return a TreeWalk at EOF
+				// iso. null.
+				return TreeWalk.forPath(repo, path, beforeTree);
+			}
+			TreeWalk walk = new TreeWalk(repo);
+
+			// Use a TreeWalk with a DirCacheIterator to pick up the correct
+			// clean/smudge filters.
+			int cacheTreeIdx = walk.addTree(new DirCacheIterator(cache));
+			FileTreeIterator files = new FileTreeIterator(repo);
+			if (FILE_TREE_INDEX != walk.addTree(files))
+				throw new IllegalStateException();
+
+			walk.setFilter(AndTreeFilter.create(
+					PathFilterGroup.createFromStrings(path),
+					new NotIgnoredFilter(FILE_TREE_INDEX)));
+			walk.setOperationType(OperationType.CHECKIN_OP);
+			walk.setRecursive(true);
+			files.setDirCacheIterator(walk, cacheTreeIdx);
+			return walk;
+		} catch (IOException e) {
+			throw new PatchApplyException(MessageFormat.format(
+					JGitText.get().patchApplyException, e.getMessage()), e);
+		}
+	}
+
+	private static final int FILE_TREE_INDEX = 1;
+
+	/**
+	 * Applies patch to a single file.
+	 *
+	 * @param pathWithOriginalContent
+	 *            The path to use for the pre-image. Also determines CRLF and
+	 *            smudge settings.
+	 * @param dirCache
+	 *            Dircache to read existing data from.
+	 * @param dirCacheBuilder
+	 *            Builder for Dircache to write new data to.
+	 * @param f
+	 *            The file to update with new contents. Null for inCore usage.
+	 * @param fh
+	 *            The patch header.
+	 * @throws PatchApplyException
+	 */
+	private void apply(String pathWithOriginalContent, DirCache dirCache,
+			DirCacheBuilder dirCacheBuilder, @Nullable File f,
+			org.eclipse.jgit.patch.FileHeader fh) throws PatchApplyException {
+		if (PatchType.BINARY.equals(fh.getPatchType())) {
+			// This patch type just says "something changed". We can't do
+			// anything with that.
+			// Maybe this should return an error code, though?
+			return;
+		}
+		try {
+			TreeWalk walk = getTreeWalkForFile(pathWithOriginalContent, dirCache);
+			boolean loadedFromTreeWalk = false;
+			// CR-LF handling is determined by whether the file or the patch
+			// have CR-LF line endings.
+			boolean convertCrLf = inCore() || needsCrLfConversion(f, fh);
+			EolStreamType streamType = convertCrLf ? EolStreamType.TEXT_CRLF
+					: EolStreamType.DIRECT;
+			String smudgeFilterCommand = null;
+			StreamSupplier fileStreamSupplier = null;
+			ObjectId fileId = ObjectId.zeroId();
+			if (walk == null) {
+				// For new files with inCore()==true, TreeWalk.forPath can be
+				// null. Stay with defaults.
+			} else if (inCore()) {
+				fileId = walk.getObjectId(0);
+				ObjectLoader loader = LfsFactory.getInstance()
+						.applySmudgeFilter(repo, reader.open(fileId, OBJ_BLOB),
+								null);
+				byte[] data = loader.getBytes();
+				convertCrLf = RawText.isCrLfText(data);
+				fileStreamSupplier = () -> new ByteArrayInputStream(data);
+				streamType = convertCrLf ? EolStreamType.TEXT_CRLF
+						: EolStreamType.DIRECT;
+				smudgeFilterCommand = walk
+						.getFilterCommand(Constants.ATTR_FILTER_TYPE_SMUDGE);
+				loadedFromTreeWalk = true;
+			} else 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.
+				streamType = convertCrLf ? EolStreamType.TEXT_CRLF
+						: walk.getEolStreamType(OperationType.CHECKOUT_OP);
+				smudgeFilterCommand = walk
+						.getFilterCommand(Constants.ATTR_FILTER_TYPE_SMUDGE);
+				FileTreeIterator file = walk.getTree(FILE_TREE_INDEX,
+						FileTreeIterator.class);
+				if (file != null) {
+					fileId = file.getEntryObjectId();
+					fileStreamSupplier = file::openEntryStream;
+					loadedFromTreeWalk = true;
+				} else {
+					throw new PatchApplyException(MessageFormat.format(
+							JGitText.get().cannotReadFile,
+							pathWithOriginalContent));
+				}
+			}
+
+			if (fileStreamSupplier == null)
+				fileStreamSupplier = inCore() ? InputStream::nullInputStream
+						: () -> new FileInputStream(f);
+
+			FileMode fileMode = fh.getNewMode() != null ? fh.getNewMode()
+					: FileMode.REGULAR_FILE;
+			ContentStreamLoader resultStreamLoader;
+			if (PatchType.GIT_BINARY.equals(fh.getPatchType())) {
+				// binary patches are processed in a streaming fashion. Some
+				// binary patches do random access on the input data, so we can't
+				// overwrite the file while we're streaming.
+				resultStreamLoader = applyBinary(pathWithOriginalContent, f, fh,
+						fileStreamSupplier, fileId);
+			} else {
+				String filterCommand = walk != null
+						? walk.getFilterCommand(
+								Constants.ATTR_FILTER_TYPE_CLEAN)
+						: null;
+				RawText raw = getRawText(f, fileStreamSupplier, fileId,
+						pathWithOriginalContent, loadedFromTreeWalk, filterCommand,
+						convertCrLf);
+				resultStreamLoader = applyText(raw, fh);
+			}
+
+			if (f != null) {
+				// Write to a buffer and copy to the file only if everything was
+				// fine.
+				TemporaryBuffer buffer = new TemporaryBuffer.LocalFile(null);
+				try {
+					CheckoutMetadata metadata = new CheckoutMetadata(streamType,
+							smudgeFilterCommand);
+
+					try (TemporaryBuffer buf = buffer) {
+						DirCacheCheckout.getContent(repo, pathWithOriginalContent,
+								metadata, resultStreamLoader.supplier, workingTreeOptions,
+								buf);
+					}
+					try (InputStream bufIn = buffer.openInputStream()) {
+						Files.copy(bufIn, f.toPath(),
+								StandardCopyOption.REPLACE_EXISTING);
+					}
+				} finally {
+					buffer.destroy();
+				}
+
+				repo.getFS().setExecute(f,
+						fileMode == FileMode.EXECUTABLE_FILE);
+			}
+
+			Instant lastModified = f == null ? null
+					: repo.getFS().lastModifiedInstant(f);
+			Attributes attributes = walk != null ? walk.getAttributes()
+					: new Attributes();
+
+			DirCacheEntry dce = insertToIndex(
+					resultStreamLoader.supplier.load(),
+					fh.getNewPath().getBytes(StandardCharsets.UTF_8), fileMode,
+					lastModified, resultStreamLoader.length,
+					attributes.get(Constants.ATTR_FILTER));
+			dirCacheBuilder.add(dce);
+			if (PatchType.GIT_BINARY.equals(fh.getPatchType())
+					&& fh.getNewId() != null && fh.getNewId().isComplete()
+					&& !fh.getNewId().toObjectId().equals(dce.getObjectId())) {
+				throw new PatchApplyException(MessageFormat.format(
+						JGitText.get().applyBinaryResultOidWrong,
+						pathWithOriginalContent));
+			}
+		} catch (IOException | UnsupportedOperationException e) {
+			throw new PatchApplyException(MessageFormat.format(
+					JGitText.get().patchApplyException, e.getMessage()), e);
+		}
+	}
+
+	private DirCacheEntry insertToIndex(InputStream input, byte[] path,
+			FileMode fileMode, Instant lastModified, long length,
+			Attribute lfsAttribute) throws IOException {
+		DirCacheEntry dce = new DirCacheEntry(path, DirCacheEntry.STAGE_0);
+		dce.setFileMode(fileMode);
+		if (lastModified != null) {
+			dce.setLastModified(lastModified);
+		}
+		dce.setLength(length);
+
+		try (LfsInputStream is = org.eclipse.jgit.util.LfsFactory.getInstance()
+				.applyCleanFilter(repo, input, length, lfsAttribute)) {
+			dce.setObjectId(inserter.insert(OBJ_BLOB, is.getLength(), is));
+		}
+
+		return dce;
+	}
+
+	/**
+	 * Gets the raw text of the given file.
+	 *
+	 * @param file
+	 *            to read from
+	 * @param fileStreamSupplier
+	 *            if fromTreewalk, the stream of the file content
+	 * @param fileId
+	 *            of the file
+	 * @param path
+	 *            of the file
+	 * @param fromTreeWalk
+	 *            whether the file was loaded by a {@link TreeWalk}
+	 * @param filterCommand
+	 *            for reading the file content
+	 * @param convertCrLf
+	 *            whether a CR-LF conversion is needed
+	 * @return the result raw text
+	 * @throws IOException
+	 *             in case of filtering issues
+	 */
+	private RawText getRawText(@Nullable File file,
+			StreamSupplier fileStreamSupplier, ObjectId fileId, String path,
+			boolean fromTreeWalk, String filterCommand, boolean convertCrLf)
+			throws IOException {
+		if (fromTreeWalk) {
+			// Can't use file.openEntryStream() as we cannot control its CR-LF
+			// conversion.
+			try (InputStream input = filterClean(repo, path,
+					fileStreamSupplier.load(), convertCrLf, filterCommand)) {
+				return new RawText(org.eclipse.jgit.util.IO
+						.readWholeStream(input, 0).array());
+			}
+		}
+		if (convertCrLf) {
+			try (InputStream input = EolStreamTypeUtil.wrapInputStream(
+					fileStreamSupplier.load(), EolStreamType.TEXT_LF)) {
+				return new RawText(org.eclipse.jgit.util.IO
+						.readWholeStream(input, 0).array());
+			}
+		}
+		if (inCore() && fileId.equals(ObjectId.zeroId())) {
+			return new RawText(new byte[] {});
+		}
+		return new RawText(file);
+	}
+
+	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 (org.eclipse.jgit.util.StringUtils.isEmptyOrNull(filterCommand)) {
+			return input;
+		}
+		if (FilterCommandRegistry.isRegistered(filterCommand)) {
+			LocalFile buffer = new org.eclipse.jgit.util.TemporaryBuffer.LocalFile(
+					null, inCoreSizeLimit);
+			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();
+		}
+		org.eclipse.jgit.util.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, input);
+		} 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),
+					org.eclipse.jgit.util.RawParseUtils
+							.decode(result.getStderr().toByteArray(4096))));
+		}
+		return result.getStdout().openInputStreamWithAutoDestroy();
+	}
+
+	private boolean needsCrLfConversion(File f,
+			org.eclipse.jgit.patch.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(
+			org.eclipse.jgit.patch.FileHeader fileHeader) {
+		if (PatchType.GIT_BINARY.equals(fileHeader.getPatchType())) {
+			return false;
+		}
+		for (org.eclipse.jgit.patch.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 ObjectId hash(File f) throws IOException {
+		try (FileInputStream fis = new FileInputStream(f);
+				SHA1InputStream shaStream = new SHA1InputStream(fis,
+						f.length())) {
+			shaStream.transferTo(OutputStream.nullOutputStream());
+			return shaStream.getHash().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 a new file. The OID of an empty file is not the
+				// zero id!
+				hashOk = Constants.EMPTY_BLOB_ID.equals(id);
+			}
+		} else if (!inCore()) {
+			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 boolean inCore() {
+		return beforeTree != null;
+	}
+
+	/**
+	 * Provide stream, along with the length of the object. We use this once to
+	 * patch to the working tree, once to write the index. For on-disk
+	 * operation, presumably we could stream to the destination file, and then
+	 * read back the stream from disk. We don't because it is more complex.
+	 */
+	private static class ContentStreamLoader {
+
+		StreamSupplier supplier;
+
+		long length;
+
+		ContentStreamLoader(StreamSupplier supplier, long length) {
+			this.supplier = supplier;
+			this.length = length;
+		}
+	}
+
+	/**
+	 * Applies a binary patch.
+	 *
+	 * @param path
+	 *            pathname of the file to write.
+	 * @param f
+	 *            destination file
+	 * @param fh
+	 *            the patch to apply
+	 * @param inputSupplier
+	 *            a supplier for the contents of the old file
+	 * @param id
+	 *            SHA1 for the old content
+	 * @return a loader for the new content.
+	 * @throws PatchApplyException
+	 * @throws IOException
+	 * @throws UnsupportedOperationException
+	 */
+	private ContentStreamLoader applyBinary(String path, File f,
+			org.eclipse.jgit.patch.FileHeader fh, StreamSupplier inputSupplier,
+			ObjectId id) throws PatchApplyException, IOException,
+			UnsupportedOperationException {
+		if (!fh.getOldId().isComplete() || !fh.getNewId().isComplete()) {
+			throw new PatchApplyException(MessageFormat
+					.format(JGitText.get().applyBinaryOidTooShort, path));
+		}
+		org.eclipse.jgit.patch.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;
+		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);
+			StreamSupplier supp = () -> new InflaterInputStream(
+					new BinaryHunkInputStream(new ByteArrayInputStream(
+							hunk.getBuffer(), start, length)));
+			return new ContentStreamLoader(supp, hunk.getSize());
+		}
+		case DELTA_DEFLATED: {
+			// Unfortunately delta application needs random access to the
+			// base to construct the result.
+			byte[] base;
+			try (InputStream in = inputSupplier.load()) {
+				base = IO.readWholeStream(in, 0).array();
+			}
+			// At least stream the result! We don't have to close these streams,
+			// as they don't hold resources.
+			StreamSupplier supp = () -> new BinaryDeltaInputStream(base,
+					new InflaterInputStream(
+							new BinaryHunkInputStream(new ByteArrayInputStream(
+									hunk.getBuffer(), start, length))));
+
+			// This just reads the first bits of the stream.
+			long finalSize = ((BinaryDeltaInputStream) supp.load()).getExpectedResultSize();
+
+			return new ContentStreamLoader(supp, finalSize);
+		}
+		default:
+			throw new UnsupportedOperationException(MessageFormat.format(
+					JGitText.get().applyBinaryPatchTypeNotSupported,
+					hunk.getType().name()));
+		}
+	}
+
+	private ContentStreamLoader applyText(RawText rt,
+			org.eclipse.jgit.patch.FileHeader fh)
+			throws IOException, PatchApplyException {
+		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;
+		for (org.eclipse.jgit.patch.HunkHeader hh : fh.getHunks()) {
+			// We assume hunks to be ordered
+			if (hh.getNewStartLine() <= lastHunkNewLine) {
+				throw new PatchApplyException(MessageFormat
+						.format(JGitText.get().patchApplyException, hh));
+			}
+			lastHunkNewLine = hh.getNewStartLine();
+
+			byte[] b = new byte[hh.getEndOffset() - hh.getStartOffset()];
+			System.arraycopy(hh.getBuffer(), hh.getStartOffset(), b, 0,
+					b.length);
+			RawText hrt = new RawText(b);
+
+			List<ByteBuffer> hunkLines = new ArrayList<>(hrt.size());
+			for (int i = 0; i < hrt.size(); i++) {
+				hunkLines.add(hrt.getRawString(i));
+			}
+
+			if (hh.getNewStartLine() == 0) {
+				// Must be the single hunk for clearing all content
+				if (fh.getHunks().size() == 1
+						&& canApplyAt(hunkLines, newLines, 0)) {
+					newLines.clear();
+					break;
+				}
+				throw new PatchApplyException(MessageFormat
+						.format(JGitText.get().patchApplyException, hh));
+			}
+			// Hunk lines as reported by the hunk may be off, so don't rely on
+			// them.
+			int applyAt = hh.getNewStartLine() - 1 + lineNumberShift;
+			// But they definitely should not go backwards.
+			if (applyAt < afterLastHunk && lineNumberShift < 0) {
+				applyAt = hh.getNewStartLine() - 1;
+				lineNumberShift = 0;
+			}
+			if (applyAt < afterLastHunk) {
+				throw new PatchApplyException(MessageFormat
+						.format(JGitText.get().patchApplyException, hh));
+			}
+			boolean applies = false;
+			int oldLinesInHunk = hh.getLinesContext()
+					+ hh.getOldImage().getLinesDeleted();
+			if (oldLinesInHunk <= 1) {
+				// Don't shift hunks without context lines. Just try the
+				// position corrected by the current lineNumberShift, and if
+				// that fails, the position recorded in the hunk header.
+				applies = canApplyAt(hunkLines, newLines, applyAt);
+				if (!applies && lineNumberShift != 0) {
+					applyAt = hh.getNewStartLine() - 1;
+					applies = applyAt >= afterLastHunk
+							&& canApplyAt(hunkLines, newLines, applyAt);
+				}
+			} else {
+				int maxShift = applyAt - afterLastHunk;
+				for (int shift = 0; shift <= maxShift; shift++) {
+					if (canApplyAt(hunkLines, newLines, applyAt - shift)) {
+						applies = true;
+						applyAt -= shift;
+						break;
+					}
+				}
+				if (!applies) {
+					// Try shifting the hunk downwards
+					applyAt = hh.getNewStartLine() - 1 + lineNumberShift;
+					maxShift = newLines.size() - applyAt - oldLinesInHunk;
+					for (int shift = 1; shift <= maxShift; shift++) {
+						if (canApplyAt(hunkLines, newLines, applyAt + shift)) {
+							applies = true;
+							applyAt += shift;
+							break;
+						}
+					}
+				}
+			}
+			if (!applies) {
+				throw new PatchApplyException(MessageFormat
+						.format(JGitText.get().patchApplyException, hh));
+			}
+			// Hunk applies at applyAt. Apply it, and update afterLastHunk and
+			// lineNumberShift
+			lineNumberShift = applyAt - hh.getNewStartLine() + 1;
+			int sz = hunkLines.size();
+			for (int j = 1; j < sz; j++) {
+				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;
+				case '-':
+					newLines.remove(applyAt);
+					break;
+				case '+':
+					newLines.add(applyAt++, slice(hunkLine, 1));
+					break;
+				default:
+					break;
+				}
+			}
+			afterLastHunk = applyAt;
+		}
+		if (!isNoNewlineAtEndOfFile(fh)) {
+			newLines.add(null);
+		}
+		if (!rt.isMissingNewlineAtEnd()) {
+			oldLines.add(null);
+		}
+
+		// We could check if old == new, but the short-circuiting complicates
+		// logic for inCore patching, so just write the new thing regardless.
+		TemporaryBuffer buffer = new TemporaryBuffer.LocalFile(null);
+		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');
+				}
+			}
+			return new ContentStreamLoader(buffer::openInputStream,
+					buffer.length());
+		}
+	}
+
+	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++) {
+			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(slice(hunkLine, 1))) {
+					return false;
+				}
+				pos++;
+				break;
+			default:
+				break;
+			}
+		}
+		return true;
+	}
+
+	private ByteBuffer slice(ByteBuffer b, int off) {
+		int newOffset = b.position() + off;
+		return ByteBuffer.wrap(b.array(), newOffset, b.limit() - newOffset);
+	}
+
+	private boolean isNoNewlineAtEndOfFile(
+			org.eclipse.jgit.patch.FileHeader fh) {
+		List<? extends org.eclipse.jgit.patch.HunkHeader> hunks = fh.getHunks();
+		if (hunks == null || hunks.isEmpty()) {
+			return false;
+		}
+		org.eclipse.jgit.patch.HunkHeader lastHunk = hunks
+				.get(hunks.size() - 1);
+		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$,
+															// $NON-NLS-2$
+	}
+
+	/**
+	 * An {@link InputStream} that updates a {@link SHA1} on every byte read.
+	 */
+	private static class SHA1InputStream extends InputStream {
+
+		private final SHA1 hash;
+
+		private final InputStream in;
+
+		SHA1InputStream(InputStream in, long size) {
+			hash = SHA1.newInstance();
+			hash.update(Constants.encodedTypeString(Constants.OBJ_BLOB));
+			hash.update((byte) ' ');
+			hash.update(Constants.encodeASCII(size));
+			hash.update((byte) 0);
+			this.in = in;
+		}
+
+		public SHA1 getHash() {
+			return hash;
+		}
+
+		@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/transport/FetchV2Request.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchV2Request.java
index 446a3bc..401744f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchV2Request.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchV2Request.java
@@ -101,7 +101,7 @@ boolean wasWaitForDoneReceived() {
 	}
 
 	/**
-	 * Options received in server-option lines. The caller can choose to	 act on
+	 * Options received in server-option lines. The caller can choose to act on
 	 * these in an application-specific way
 	 *
 	 * @return Immutable list of server options received in the request
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoCRLFOutputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoCRLFOutputStream.java
index e638b2d..305ccbd 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoCRLFOutputStream.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoCRLFOutputStream.java
@@ -10,6 +10,7 @@
 
 package org.eclipse.jgit.util.io;
 
+import java.io.BufferedOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
 
@@ -58,7 +59,9 @@ public AutoCRLFOutputStream(OutputStream out) {
 	 * @since 4.3
 	 */
 	public AutoCRLFOutputStream(OutputStream out, boolean detectBinary) {
-		this.out = out;
+		// avoid to write single lines directly to FileOutputStream:
+		this.out = out instanceof BufferedOutputStream ? out
+				: new BufferedOutputStream(out);
 		this.detectBinary = detectBinary;
 	}
 
diff --git a/pom.xml b/pom.xml
index 5693c10..3f2ea59 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>6.3.1-SNAPSHOT</version>
+  <version>6.4.0-SNAPSHOT</version>
 
   <name>JGit - Parent</name>
   <url>${jgit-url}</url>