本文整理了Java中org.eclipse.jgit.lib.Repository.writeRebaseTodoFile
方法的一些代码示例,展示了Repository.writeRebaseTodoFile
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.writeRebaseTodoFile
方法的具体详情如下:
包路径:org.eclipse.jgit.lib.Repository
类名称:Repository
方法名:writeRebaseTodoFile
[英]Write a file formatted like a git-rebase-todo file.
[中]编写一个格式类似git rebase todo文件的文件。
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit
/**
* Removes the number of lines given in the parameter from the
* <code>git-rebase-todo</code> file but preserves comments and other lines
* that can not be parsed as steps
*
* @param numSteps
* @throws IOException
*/
private void popSteps(int numSteps) throws IOException {
if (numSteps == 0)
return;
List<RebaseTodoLine> todoLines = new LinkedList<>();
List<RebaseTodoLine> poppedLines = new LinkedList<>();
for (RebaseTodoLine line : repo.readRebaseTodo(
rebaseState.getPath(GIT_REBASE_TODO), true)) {
if (poppedLines.size() >= numSteps
|| RebaseTodoLine.Action.COMMENT.equals(line.getAction()))
todoLines.add(line);
else
poppedLines.add(line);
}
repo.writeRebaseTodoFile(rebaseState.getPath(GIT_REBASE_TODO),
todoLines, false);
if (poppedLines.size() > 0) {
repo.writeRebaseTodoFile(rebaseState.getPath(DONE), poppedLines,
true);
}
}
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit
repo.writeRebaseTodoFile(rebaseState.getPath(GIT_REBASE_TODO),
steps, false);
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit
toDoSteps.add(new RebaseTodoLine(Action.PICK, reader
.abbreviate(commit), commit.getShortMessage()));
repo.writeRebaseTodoFile(rebaseState.getPath(GIT_REBASE_TODO),
toDoSteps, false);
代码示例来源:origin: sonia.jgit/org.eclipse.jgit
/**
* Removes the number of lines given in the parameter from the
* <code>git-rebase-todo</code> file but preserves comments and other lines
* that can not be parsed as steps
*
* @param numSteps
* @throws IOException
*/
private void popSteps(int numSteps) throws IOException {
if (numSteps == 0)
return;
List<RebaseTodoLine> todoLines = new LinkedList<RebaseTodoLine>();
List<RebaseTodoLine> poppedLines = new LinkedList<RebaseTodoLine>();
for (RebaseTodoLine line : repo.readRebaseTodo(
rebaseState.getPath(GIT_REBASE_TODO), true)) {
if (poppedLines.size() >= numSteps
|| RebaseTodoLine.Action.COMMENT.equals(line.getAction()))
todoLines.add(line);
else
poppedLines.add(line);
}
repo.writeRebaseTodoFile(rebaseState.getPath(GIT_REBASE_TODO),
todoLines, false);
if (poppedLines.size() > 0) {
repo.writeRebaseTodoFile(rebaseState.getPath(DONE), poppedLines,
true);
}
}
代码示例来源:origin: berlam/github-bucket
/**
* Removes the number of lines given in the parameter from the
* <code>git-rebase-todo</code> file but preserves comments and other lines
* that can not be parsed as steps
*
* @param numSteps
* @throws IOException
*/
private void popSteps(int numSteps) throws IOException {
if (numSteps == 0)
return;
List<RebaseTodoLine> todoLines = new LinkedList<>();
List<RebaseTodoLine> poppedLines = new LinkedList<>();
for (RebaseTodoLine line : repo.readRebaseTodo(
rebaseState.getPath(GIT_REBASE_TODO), true)) {
if (poppedLines.size() >= numSteps
|| RebaseTodoLine.Action.COMMENT.equals(line.getAction()))
todoLines.add(line);
else
poppedLines.add(line);
}
repo.writeRebaseTodoFile(rebaseState.getPath(GIT_REBASE_TODO),
todoLines, false);
if (poppedLines.size() > 0) {
repo.writeRebaseTodoFile(rebaseState.getPath(DONE), poppedLines,
true);
}
}
代码示例来源:origin: sonia.jgit/org.eclipse.jgit
repo.writeRebaseTodoFile(rebaseState.getPath(GIT_REBASE_TODO),
steps, false);
代码示例来源:origin: berlam/github-bucket
repo.writeRebaseTodoFile(rebaseState.getPath(GIT_REBASE_TODO),
steps, false);
代码示例来源:origin: sonia.jgit/org.eclipse.jgit
toDoSteps.add(new RebaseTodoLine(Action.PICK, reader
.abbreviate(commit), commit.getShortMessage()));
repo.writeRebaseTodoFile(rebaseState.getPath(GIT_REBASE_TODO),
toDoSteps, false);
代码示例来源:origin: berlam/github-bucket
toDoSteps.add(new RebaseTodoLine(Action.PICK, reader
.abbreviate(commit), commit.getShortMessage()));
repo.writeRebaseTodoFile(rebaseState.getPath(GIT_REBASE_TODO),
toDoSteps, false);
内容来源于网络,如有侵权,请联系作者删除!