private RevWalk verifyConnected(final Repository repo, final ObjectId revid)
throws InvalidRevisionException {
try {
final ObjectWalk rw = new ObjectWalk(repo);
try {
rw.markStart(rw.parseCommit(revid));
} catch (IncorrectObjectTypeException err) {
throw new InvalidRevisionException();
}
for (final Ref r : repo.getAllRefs().values()) {
try {