org.eclipse.jgit.api.Git.remoteRemove()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(200)

本文整理了Java中org.eclipse.jgit.api.Git.remoteRemove()方法的一些代码示例,展示了Git.remoteRemove()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Git.remoteRemove()方法的具体详情如下:
包路径:org.eclipse.jgit.api.Git
类名称:Git
方法名:remoteRemove

Git.remoteRemove介绍

[英]Return a command used to remove an existing remote.
[中]返回用于删除现有远程服务器的命令。

代码示例

代码示例来源:origin: jphp-group/jphp

@Signature
public Memory remoteRemove(String name) throws URISyntaxException, GitAPIException {
  RemoteRemoveCommand command = getWrappedObject().remoteRemove();
  command.setName(name);
  return GitUtils.valueOf(command.call());
}

代码示例来源:origin: org.openmrs.maven.plugins/openmrs-sdk-maven-plugin

private void removeRemote(Git git, String name) {
  RemoteRemoveCommand remoteRemove = git.remoteRemove();
  remoteRemove.setName(name);
  try {
    remoteRemove.call();
  } catch (GitAPIException e) {
    throw new IllegalStateException(e);
  }
}

代码示例来源:origin: org.openmrs.maven.plugins/openmrs-sdk-maven-plugin

/**
 * Deletes upstream remote repo
 */
private void deleteUpstreamRepo(Git git) throws Exception {
  RemoteRemoveCommand remoteRemoveCommand = git.remoteRemove();
  remoteRemoveCommand.setName(UPSTREAM);
  try {
    remoteRemoveCommand.call();
  } catch (GitAPIException e) {
    throw new Exception(DELETING_REMOTE_UPSTREAM_REASON, e);
  }
}

代码示例来源:origin: kiegroup/appformer

private void removeOriginRemote(Repository repository) throws GitAPIException {
  final org.eclipse.jgit.api.Git git = org.eclipse.jgit.api.Git.wrap(repository);
  final RemoteRemoveCommand cmd = git.remoteRemove();
  cmd.setName(origin);
  cmd.call();
}

相关文章