// the remote is repo2
URIish remote = new URIish("file:///"
+ repository2.getRepository().getDirectory().toString());
// update master upon master
List<RemoteRefUpdate> refUpdates = new ArrayList<RemoteRefUpdate>();
RemoteRefUpdate update = new RemoteRefUpdate(repository1
.getRepository(), "HEAD", "refs/heads/test", false, null, null);
refUpdates.add(update);
spec.addURIRefUpdates(remote, refUpdates);
// now we can construct the push operation
PushOperation pop = new PushOperation(repository1.getRepository(),