Exemplo n.º 1
0
  @Override
  public PushResponse push(PushRequest request) throws GitException, UnauthorizedException {
    String remoteUri = getRemoteUri(request.getRemote());

    PushCommand pushCommand = nativeGit.createPushCommand();

    pushCommand
        .setRemote(request.getRemote())
        .setForce(request.isForce())
        .setRefSpec(request.getRefSpec())
        .setRemoteUri(remoteUri)
        .setTimeout(request.getTimeout());

    executeRemoteCommand(pushCommand);

    return pushCommand.getPushResponse();
  }