]> source.dussan.org Git - jgit.git/commit
Added check for binary files while diffing 01/1001/2
authorJeff Schumacher <jeffschu@google.com>
Tue, 29 Jun 2010 23:04:08 +0000 (16:04 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Wed, 30 Jun 2010 00:23:00 +0000 (17:23 -0700)
commit9f2249bd26199f6b79b72bff8328e18a0935191b
treecef1bdcd51e68578dd8b17b08273098423b56d29
parent730b708dae88a79cb3d926fc96ada377516c583c
Added check for binary files while diffing

Added a check in Diff to ensure that files that are most likely
not text are not line-by-line diffed. Files are determined to be
binary by checking the first 8000 bytes for a null character. This
is a similar heuristic to what C Git uses.

Change-Id: I2b6f05674c88d89b3f549a5db483f850f7f46c26
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java
org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java