Skip to content

Instantly share code, notes, and snippets.

View robisonsantos's full-sized avatar

Robison WR Santos robisonsantos

View GitHub Profile
@robisonsantos
robisonsantos / RawDiff.java
Created May 18, 2018 20:15
Simple jGit git diff --raw implementation
import org.apache.commons.lang3.StringUtils;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.diff.DiffEntry;
import org.eclipse.jgit.lib.ObjectReader;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.revwalk.RevTree;
import org.eclipse.jgit.revwalk.RevWalk;
import org.eclipse.jgit.treewalk.AbstractTreeIterator;