public void testMultiRename() throws Exception {
final String contents = "A";
final RevCommit a = commit(tree(file("a", blob(contents))));
// rename a to b
CommitBuilder commitBuilder = commitBuilder().parent(a)
.add("b", blob(contents)).rm("a");
RevCommit renameCommit1 = commitBuilder.create();
// rename b to c
commitBuilder = commitBuilder().parent(renameCommit1)
.add("c", blob(contents)).rm("b");
RevCommit renameCommit2 = commitBuilder.create();
// rename c to a
commitBuilder = commitBuilder().parent(renameCommit2)
.add("a", blob(contents)).rm("c");
RevCommit renameCommit3 = commitBuilder.create();
follow("a");
markStart(renameCommit3);
assertCommit(renameCommit3, rw.next());
assertCommit(renameCommit2, rw.next());