]> source.dussan.org Git - jgit.git/commit
Introduce RawText#load. 16/106516/12
authorHan-Wen Nienhuys <hanwen@google.com>
Mon, 9 Oct 2017 16:11:04 +0000 (18:11 +0200)
committerHan-Wen Nienhuys <hanwen@google.com>
Tue, 24 Oct 2017 12:49:10 +0000 (14:49 +0200)
commitea2a4e3abec852788c15c89d1637d145c5b2ce52
tree24ffe4f3c0edc3f6f47886e034fa94a1ecd7d788
parentfbefe1e999d44e4cdb605c238da7d916fada7274
Introduce RawText#load.

This method creates a RawText from a blob, but avoids reading the blob
if the start contains null bytes. This should reduce the amount of
garbage that Gerrit produces for changes with binaries.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Change-Id: Idd202d20251f2d1653e5f1ca374fe644c2cf205f
org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RawTextLoadTest.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java
org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java
org.eclipse.jgit/src/org/eclipse/jgit/errors/BinaryBlobException.java [new file with mode: 0644]