Example usage for org.eclipse.jgit.patch Patch parse

List of usage examples for org.eclipse.jgit.patch Patch parse

Introduction

In this page you can find the example usage for org.eclipse.jgit.patch Patch parse.

Prototype

public void parse(byte[] buf, int ptr, int end) 

Source Link

Document

Parse a patch stored in a byte[].

Usage

From source file:com.google.gitiles.DiffServletTest.java

License:Apache License

private static Patch parsePatch(byte[] enc) {
    byte[] buf = BaseEncoding.base64().decode(new String(enc, UTF_8));
    Patch p = new Patch();
    p.parse(buf, 0, buf.length);
    assertEquals(ImmutableList.of(), p.getErrors());
    return p;/* ww w  .ja  v  a  2s  . co  m*/
}