I want to get a list of changed/added/deleted files between revision XXXXXX and HEAD. This is what I have so far:
String oldHash = "a97e5553e37a25bd1a3c99eab303145baed08dbd";
Git git = Git.open(new File("/tmp/jgit"));
Repository repository = git.getRepository();
ObjectId old = repository.resolve(oldHash);
ObjectId head = repository.resolve("HEAD");
// how do i get the trees from the obj. id?
List<<DiffEntry> diffs = git.diff().setNewTree(null).setOldTree(null).call();
for(DiffEntry diff : diffs) {
// do stuff
}
Is this the right way to go about it and if so, how do I get the trees required for git.diff() ?