Set empty patches with no Git metadata to PatchType.BINARY
commite6f86d3a7c8294b24e080c633cbf5a66c258cb60
authorShawn O. Pearce <spearce@spearce.org>
Fri, 12 Dec 2008 02:46:13 +0000 (11 18:46 -0800)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Sat, 13 Dec 2008 02:13:26 +0000 (13 03:13 +0100)
tree5424d9018803222979761b706b795d8b79fb8d79
parent6553e6b474fbec3425c2ff6700a5f4c3ff127e0c
Set empty patches with no Git metadata to PatchType.BINARY

If a patch has no Git specific metadata and it has no hunks then
it is very likely a binary patch with a "Binary files ... differ"
warning message in a different language, or the message has been
mangled by an editor.  We should consider such patches to be the
same as a binary patch, as there is nothing here to perform an
action on.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.jgit.test/tst/org/spearce/jgit/patch/FileHeaderTest.java
org.spearce.jgit.test/tst/org/spearce/jgit/patch/PatchTest.java
org.spearce.jgit/src/org/spearce/jgit/patch/FileHeader.java
org.spearce.jgit/src/org/spearce/jgit/patch/Patch.java