]> source.dussan.org Git - jgit.git/commit
ApplyCommand: add a stream to apply a delta patch 94/177594/4
authorThomas Wolf <thomas.wolf@paranor.ch>
Sun, 7 Mar 2021 17:49:01 +0000 (18:49 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Tue, 25 May 2021 22:37:59 +0000 (00:37 +0200)
commit0fe794a433d54504de066ae119b5835ab69c1c54
tree16816bdb86f8f7397bb299efb3a530f80f537785
parent2eb54afe6a5cb5dd2a108285ad1676b7798d5a15
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 <thomas.wolf@paranor.ch>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/util/io/delta1.forward [new file with mode: 0644]
org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/util/io/delta1.reverse [new file with mode: 0644]
org.eclipse.jgit.test/tst/org/eclipse/jgit/util/io/BinaryDeltaInputStreamTest.java [new file with mode: 0644]
org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
org.eclipse.jgit/src/org/eclipse/jgit/util/io/BinaryDeltaInputStream.java [new file with mode: 0644]