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

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

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

Repository.writeMergeHeads介绍

[英]Write new merge-heads into $GIT_DIR/MERGE_HEAD. In this file operations triggering a merge will store the IDs of all heads which should be merged together with HEAD. If null is specified as list of commits the file will be deleted
[中]将新的合并头写入$GIT_DIR/merge_HEAD。在该文件中,触发合并的操作将存储所有应与HEAD合并的HEAD的ID。如果将null指定为提交列表,则文件将被删除

代码示例

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

private void resetMerge() throws IOException {
  repo.writeMergeHeads(null);
  repo.writeMergeCommitMsg(null);
}

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

private void writeMergeInfo(RevCommit commitToPick,
    List<RevCommit> newParents) throws IOException {
  repo.writeMergeHeads(newParents.subList(1, newParents.size()));
  repo.writeMergeCommitMsg(commitToPick.getFullMessage());
}

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

private void resetMerge() throws IOException {
  repo.writeMergeHeads(null);
  repo.writeMergeCommitMsg(null);
}

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

private void resetMerge() throws IOException {
  repo.writeMergeHeads(null);
  repo.writeMergeCommitMsg(null);
}

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

private void writeMergeInfo(RevCommit commitToPick,
    List<RevCommit> newParents) throws IOException {
  repo.writeMergeHeads(newParents.subList(1, newParents.size()));
  repo.writeMergeCommitMsg(commitToPick.getFullMessage());
}

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

private void writeMergeInfo(RevCommit commitToPick,
    List<RevCommit> newParents) throws IOException {
  repo.writeMergeHeads(newParents.subList(1, newParents.size()));
  repo.writeMergeCommitMsg(commitToPick.getFullMessage());
}

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

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

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

repo.writeMergeHeads(null);
if (stashConflicts)
  return RebaseResult.STASH_APPLY_CONFLICTS_RESULT;

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

commits, head);
  repo.writeMergeCommitMsg(mergeMessage);
  repo.writeMergeHeads(Arrays.asList(ref.getObjectId()));
} else {
  List<RevCommit> squashedCommits = RevWalkUtils.find(
  if (failingPaths != null) {
    repo.writeMergeCommitMsg(null);
    repo.writeMergeHeads(null);
    return new MergeResult(null, merger.getBaseCommitId(),
        new ObjectId[] {

代码示例来源:origin: sheimi/SGit

public boolean reset() {
    try {
      mRepo.getGit().getRepository().writeMergeCommitMsg(null);
      mRepo.getGit().getRepository().writeMergeHeads(null);
      try {
        mRepo.getGit().rebase().setOperation(RebaseCommand.Operation.ABORT).call();
      } catch (Exception e) {
      }
      mRepo.getGit().reset().setMode(ResetCommand.ResetType.HARD).call();
    } catch (StopTaskException e) {
      return false;
    } catch (Throwable e) {
      setException(e);
      return false;
    }
    return true;
  }
}

代码示例来源:origin: org.uberfire/vfs-jgit

mergeMessage = new MergeMessageFormatter().format(commits, head);
  repo.writeMergeCommitMsg(mergeMessage);
  repo.writeMergeHeads(Arrays.asList(ref.getObjectId()));
} else {
  final List<RevCommit> squashedCommits = RevWalkUtils.find(revWalk, srcCommit, headCommit);
  if (failingPaths != null && !failingPaths.isEmpty()) {
    repo.writeMergeCommitMsg(null);
    repo.writeMergeHeads(null);
    return new MergeResult(null, merger.getBaseCommit(0, 1),
        new ObjectId[]{headCommit.getId(), srcCommit.getId()},

代码示例来源:origin: maks/MGit

public boolean reset() {
    try {
      mRepo.getGit().getRepository().writeMergeCommitMsg(null);
      mRepo.getGit().getRepository().writeMergeHeads(null);
      try {
        // if a rebase is in-progress, need to abort it
        mRepo.getGit().rebase().setOperation(RebaseCommand.Operation.ABORT).call();
      } catch (WrongRepositoryStateException e) {
        // Ignore this, it happens if rebase --abort is called without a rebase in progress.
        Timber.i(e, "Couldn't abort rebase while reset.");
      } catch (Exception e) {
        setException(e, R.string.error_rebase_abort_failed_in_reset);
        return false;
      }
      mRepo.getGit().reset().setMode(ResetCommand.ResetType.HARD).call();
    } catch (StopTaskException e) {
      return false;
    } catch (Throwable e) {
      setException(e);
      return false;
    }
    return true;
  }
}

代码示例来源:origin: sheimi/SGit

git.getRepository().writeMergeHeads(null);
bpm.update(1);
try {

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

repo.writeMergeHeads(null);
if (stashConflicts)
  return RebaseResult.STASH_APPLY_CONFLICTS_RESULT;

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

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

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

repo.writeMergeHeads(null);
if (stashConflicts)
  return RebaseResult.STASH_APPLY_CONFLICTS_RESULT;

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

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

代码示例来源:origin: maks/MGit

git.getRepository().writeMergeHeads(null);
bpm.update(1);
try {

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

commits, head);
  repo.writeMergeCommitMsg(mergeMessage);
  repo.writeMergeHeads(Arrays.asList(ref.getObjectId()));
} else {
  List<RevCommit> squashedCommits = RevWalkUtils.find(
  if (failingPaths != null) {
    repo.writeMergeCommitMsg(null);
    repo.writeMergeHeads(null);
    return new MergeResult(null, merger.getBaseCommitId(),
        new ObjectId[] {

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

commits, head);
  repo.writeMergeCommitMsg(mergeMessage);
  repo.writeMergeHeads(Arrays.asList(ref.getObjectId()));
} else {
  List<RevCommit> squashedCommits = RevWalkUtils.find(
  if (failingPaths != null) {
    repo.writeMergeCommitMsg(null);
    repo.writeMergeHeads(null);
    return new MergeResult(null, merger.getBaseCommitId(),
        new ObjectId[] {

相关文章

Repository类方法