RevCommit commit2 = add(repo2, "test2.txt", "content2.txt");
Repository repo = new FileRepository(testRepo);
RefUpdate originMaster = repo.updateRef(Constants.R_REMOTES
+ Constants.DEFAULT_REMOTE_NAME + "/" + Constants.MASTER);
originMaster.setNewObjectId(commit1);
originMaster.forceUpdate();
RemoteConfig config = new RemoteConfig(repo.getConfig(),
Constants.DEFAULT_REMOTE_NAME);
config.addURI(new URIish(repo2.toURI().toString()));
config.update(repo.getConfig());
Collection<RefDiff> diffs = RepositoryUtils.diffOriginRefs(repo);