From 0fe794a433d54504de066ae119b5835ab69c1c54 Mon Sep 17 00:00:00 2001 From: Thomas Wolf Date: Sun, 7 Mar 2021 18:49:01 +0100 Subject: ApplyCommand: add a stream to apply a delta patch Add a new BinaryDeltaInputStream that applies a delta provided by another InputStream to a given base. Because delta application needs random access to the base, the base itself cannot be yet another InputStream. But at least this enables streaming of the result. Add a simple test using delta hunks generated by C git. Bug: 371725 Change-Id: Ibd26fa2f49860737ad5c5387f7f4870d3e85e628 Signed-off-by: Thomas Wolf Signed-off-by: Matthias Sohn --- org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/util/io/delta1.forward | 1 + org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/util/io/delta1.reverse | 1 + 2 files changed, 2 insertions(+) create mode 100644 org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/util/io/delta1.forward create mode 100644 org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/util/io/delta1.reverse (limited to 'org.eclipse.jgit.test/tst-rsrc/org') diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/util/io/delta1.forward b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/util/io/delta1.forward new file mode 100644 index 0000000000..878b167ae9 --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/util/io/delta1.forward @@ -0,0 +1 @@ +ScmZp0Xmwa1z*+$U3j_csN(Dmz diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/util/io/delta1.reverse b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/util/io/delta1.reverse new file mode 100644 index 0000000000..7ff7a08ad0 --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/util/io/delta1.reverse @@ -0,0 +1 @@ +TcmZp5XmD5{u!xa=5hEi28?FP4 -- cgit v1.2.3