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

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

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

Repository.writeMergeCommitMsg介绍

[英]Write new content to the file $GIT_DIR/MERGE_MSG. In this file operations triggering a merge will store a template for the commit message of the merge commit. If null is specified as message the file will be deleted.
[中]将新内容写入文件$GIT_DIR/MERGE_MSG。在此文件中,触发合并的操作将为合并提交的提交消息存储一个模板。如果将null指定为消息,则文件将被删除。

代码示例

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

private void resetRevert() throws IOException {
  repo.writeRevertHead(null);
  repo.writeMergeCommitMsg(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 resetCherryPick() throws IOException {
  repo.writeCherryPickHead(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: sonia.jgit/org.eclipse.jgit

private void resetRevert() throws IOException {
  repo.writeRevertHead(null);
  repo.writeMergeCommitMsg(null);
}

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

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

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

private void resetRevert() throws IOException {
  repo.writeRevertHead(null);
  repo.writeMergeCommitMsg(null);
}

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

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

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

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

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

repo.writeMergeCommitMsg(null);
  repo.writeMergeHeads(null);
} else if (state == RepositoryState.CHERRY_PICKING_RESOLVED) {
  repo.writeMergeCommitMsg(null);
  repo.writeCherryPickHead(null);
} else if (state == RepositoryState.REVERTING_RESOLVED) {
  repo.writeMergeCommitMsg(null);
  repo.writeRevertHead(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

mergeMessage = new MergeMessageFormatter().format(
      commits, head);
  repo.writeMergeCommitMsg(mergeMessage);
  repo.writeMergeHeads(Arrays.asList(ref.getObjectId()));
} else {
} else {
  if (failingPaths != null) {
    repo.writeMergeCommitMsg(null);
    repo.writeMergeHeads(null);
    return new MergeResult(null, merger.getBaseCommitId(),
        .formatWithConflicts(mergeMessage,
            unmergedPaths);
    repo.writeMergeCommitMsg(mergeMessageWithConflicts);
    return new MergeResult(null, merger.getBaseCommitId(),
        new ObjectId[] { headCommit.getId(),

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

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

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

repo.writeMergeCommitMsg(message);

代码示例来源: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: 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

bpm.beginTask("clearing repo state", 3);
git.getRepository().writeMergeCommitMsg(null);
git.getRepository().writeMergeHeads(null);
bpm.update(1);

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

bpm.beginTask("clearing repo state", 3);
git.getRepository().writeMergeCommitMsg(null);
git.getRepository().writeMergeHeads(null);
bpm.update(1);

相关文章

Repository类方法