Record patch parsing errors for later inspection by applications
commitbdf74110d900a435dc0f646b4c64283f670ec6b9
authorShawn O. Pearce <spearce@spearce.org>
Fri, 12 Dec 2008 02:46:16 +0000 (11 18:46 -0800)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Sat, 13 Dec 2008 02:13:26 +0000 (13 03:13 +0100)
treea0a619e4eea6b7ad501143f3ec6d9c5d1b0b4789
parenta221bdb2dc72389c41684024b898f88905e17825
Record patch parsing errors for later inspection by applications

Errors identified while reading a patch script are now collected
into FormatError objects within the errors collection of a Patch.
These can be inspected to determine if a common form of breakage
is found within the patch script once its basic metadata is read.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.jgit.test/tst-rsrc/org/spearce/jgit/patch/testError_BodyTooLong.patch [new file with mode: 0644]
org.spearce.jgit.test/tst-rsrc/org/spearce/jgit/patch/testError_DisconnectedHunk.patch [new file with mode: 0644]
org.spearce.jgit.test/tst-rsrc/org/spearce/jgit/patch/testError_GarbageBetweenFiles.patch [new file with mode: 0644]
org.spearce.jgit.test/tst-rsrc/org/spearce/jgit/patch/testError_GitBinaryNoForwardHunk.patch [new file with mode: 0644]
org.spearce.jgit.test/tst-rsrc/org/spearce/jgit/patch/testError_TruncatedNew.patch [new file with mode: 0644]
org.spearce.jgit.test/tst-rsrc/org/spearce/jgit/patch/testError_TruncatedOld.patch [new file with mode: 0644]
org.spearce.jgit.test/tst/org/spearce/jgit/patch/PatchErrorTest.java [new file with mode: 0644]
org.spearce.jgit.test/tst/org/spearce/jgit/patch/PatchTest.java
org.spearce.jgit/src/org/spearce/jgit/patch/FormatError.java [new file with mode: 0644]
org.spearce.jgit/src/org/spearce/jgit/patch/HunkHeader.java
org.spearce.jgit/src/org/spearce/jgit/patch/Patch.java