]> source.dussan.org Git - jgit.git/commit
PackOutputStream: Extract cancellation and digest to superclass 09/189909/2
authorkylezhao <kylezhao@tencent.com>
Sat, 22 Jan 2022 08:54:20 +0000 (16:54 +0800)
committerkylezhao <kylezhao@tencent.com>
Thu, 27 Jan 2022 11:21:31 +0000 (19:21 +0800)
commit1a86c1044dfb8300241728571a865971aa9f1a66
treef6db951de0cdf38aa0e9b097e39f21abc2888bdf
parentd017a655dfbdac2393ec645c6864e190cf55516c
PackOutputStream: Extract cancellation and digest to superclass

Checking the cancelled status and keeping a digest of the written data
is useful for other output streams. e.g. to write commit-graphs.

Pull up that functionality to a superclass, so it can be reused.

Change-Id: I177b50be09c4ea631e7a144cc6127085ec2ca411
Signed-off-by: kylezhao <kylezhao@tencent.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/io/CancellableDigestOutputStreamTest.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/io/CancellableDigestOutputStream.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackOutputStream.java