org.eclipse.jgit.lib.Repository.writeCherryPickHead()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(104)

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

Repository.writeCherryPickHead介绍

[英]Write cherry pick commit into $GIT_DIR/CHERRY_PICK_HEAD. This is used in case of conflicts to store the cherry which was tried to be picked.
[中]将cherry pick commit写入$GIT_DIR/cherry_pick_HEAD。这是用于存储试图采摘的樱桃时发生冲突的情况。

代码示例

代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit

private void resetCherryPick() throws IOException {
  repo.writeCherryPickHead(null);
  repo.writeMergeCommitMsg(null);
}

代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit

private RebaseResult stop(RevCommit commitToPick, RebaseResult.Status status)
    throws IOException {
  PersonIdent author = commitToPick.getAuthorIdent();
  String authorScript = toAuthorScript(author);
  rebaseState.createFile(AUTHOR_SCRIPT, authorScript);
  rebaseState.createFile(MESSAGE, commitToPick.getFullMessage());
  ByteArrayOutputStream bos = new ByteArrayOutputStream();
  try (DiffFormatter df = new DiffFormatter(bos)) {
    df.setRepository(repo);
    df.format(commitToPick.getParent(0), commitToPick);
  }
  rebaseState.createFile(PATCH, new String(bos.toByteArray(), UTF_8));
  rebaseState.createFile(STOPPED_SHA,
      repo.newObjectReader()
      .abbreviate(
      commitToPick).name());
  // Remove cherry pick state file created by CherryPickCommand, it's not
  // needed for rebase
  repo.writeCherryPickHead(null);
  return RebaseResult.result(status, commitToPick);
}

代码示例来源:origin: berlam/github-bucket

private void resetCherryPick() throws IOException {
  repo.writeCherryPickHead(null);
  repo.writeMergeCommitMsg(null);
}

代码示例来源:origin: sonia.jgit/org.eclipse.jgit

private void resetCherryPick() throws IOException {
  repo.writeCherryPickHead(null);
  repo.writeMergeCommitMsg(null);
}

代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit

} else if (state == RepositoryState.CHERRY_PICKING_RESOLVED) {
  repo.writeMergeCommitMsg(null);
  repo.writeCherryPickHead(null);
} else if (state == RepositoryState.REVERTING_RESOLVED) {
  repo.writeMergeCommitMsg(null);

代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit

repo.writeCherryPickHead(null);
repo.writeMergeHeads(null);
if (stashConflicts)

代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit

repo.writeCherryPickHead(srcCommit.getId());
repo.writeMergeCommitMsg(message);

代码示例来源:origin: berlam/github-bucket

private RebaseResult stop(RevCommit commitToPick, RebaseResult.Status status)
    throws IOException {
  PersonIdent author = commitToPick.getAuthorIdent();
  String authorScript = toAuthorScript(author);
  rebaseState.createFile(AUTHOR_SCRIPT, authorScript);
  rebaseState.createFile(MESSAGE, commitToPick.getFullMessage());
  ByteArrayOutputStream bos = new ByteArrayOutputStream();
  try (DiffFormatter df = new DiffFormatter(bos)) {
    df.setRepository(repo);
    df.format(commitToPick.getParent(0), commitToPick);
  }
  rebaseState.createFile(PATCH, new String(bos.toByteArray(), UTF_8));
  rebaseState.createFile(STOPPED_SHA,
      repo.newObjectReader()
      .abbreviate(
      commitToPick).name());
  // Remove cherry pick state file created by CherryPickCommand, it's not
  // needed for rebase
  repo.writeCherryPickHead(null);
  return RebaseResult.result(status, commitToPick);
}

代码示例来源:origin: sonia.jgit/org.eclipse.jgit

private RebaseResult stop(RevCommit commitToPick, RebaseResult.Status status)
    throws IOException {
  PersonIdent author = commitToPick.getAuthorIdent();
  String authorScript = toAuthorScript(author);
  rebaseState.createFile(AUTHOR_SCRIPT, authorScript);
  rebaseState.createFile(MESSAGE, commitToPick.getFullMessage());
  ByteArrayOutputStream bos = new ByteArrayOutputStream();
  try (DiffFormatter df = new DiffFormatter(bos)) {
    df.setRepository(repo);
    df.format(commitToPick.getParent(0), commitToPick);
  }
  rebaseState.createFile(PATCH, new String(bos.toByteArray(),
      Constants.CHARACTER_ENCODING));
  rebaseState.createFile(STOPPED_SHA,
      repo.newObjectReader()
      .abbreviate(
      commitToPick).name());
  // Remove cherry pick state file created by CherryPickCommand, it's not
  // needed for rebase
  repo.writeCherryPickHead(null);
  return RebaseResult.result(status, commitToPick);
}

代码示例来源:origin: org.jboss.forge.addon/git-impl

merger.getUnmergedPaths());
repo.writeCherryPickHead(srcCommit.getId());
repo.writeMergeCommitMsg(message);

代码示例来源:origin: sonia.jgit/org.eclipse.jgit

} else if (state == RepositoryState.CHERRY_PICKING_RESOLVED) {
  repo.writeMergeCommitMsg(null);
  repo.writeCherryPickHead(null);
} else if (state == RepositoryState.REVERTING_RESOLVED) {
  repo.writeMergeCommitMsg(null);

代码示例来源:origin: berlam/github-bucket

repo.writeCherryPickHead(null);
repo.writeMergeHeads(null);
if (stashConflicts)

代码示例来源:origin: sonia.jgit/org.eclipse.jgit

repo.writeCherryPickHead(null);
repo.writeMergeHeads(null);
if (stashConflicts)

代码示例来源:origin: berlam/github-bucket

} else if (state == RepositoryState.CHERRY_PICKING_RESOLVED) {
  repo.writeMergeCommitMsg(null);
  repo.writeCherryPickHead(null);
} else if (state == RepositoryState.REVERTING_RESOLVED) {
  repo.writeMergeCommitMsg(null);

代码示例来源:origin: sonia.jgit/org.eclipse.jgit

repo.writeCherryPickHead(srcCommit.getId());
repo.writeMergeCommitMsg(message);

代码示例来源:origin: berlam/github-bucket

repo.writeCherryPickHead(srcCommit.getId());
repo.writeMergeCommitMsg(message);

相关文章

Repository类方法