public URL getDiffLink(Path path) throws IOException {
if (path.getEditType() != EditType.EDIT || path.getSrc() == null || path.getDst() == null
|| path.getChangeSet().getParentCommit() == null) {
return null;
}
GitChangeSet changeSet = path.getChangeSet();
String spec = param().add("a=blobdiff").add("f=" + path.getPath()).add("fp=" + path.getPath())
.add("h=" + path.getSrc()).add("hp=" + path.getDst())
.add("hb=" + changeSet.getId()).add("hpb=" + changeSet.getParentCommit()).toString();
return new URL(url, url.getPath() + spec);
}