- java.lang.Object
-
- org.eclipse.jgit.lib.RebaseTodoFile
-
public class RebaseTodoFile extends Object
Offers methods to read and write files formatted like the git-rebase-todo file- Since:
- 3.2
-
-
Constructor Summary
Constructors Constructor Description RebaseTodoFile(Repository repo)Constructor for RebaseTodoFile.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<RebaseTodoLine>readRebaseTodo(String path, boolean includeComments)Read a file formatted like the git-rebase-todo file.voidwriteRebaseTodoFile(String path, List<RebaseTodoLine> steps, boolean append)Write a file formatted like a git-rebase-todo file.
-
-
-
Constructor Detail
-
RebaseTodoFile
public RebaseTodoFile(Repository repo)
Constructor for RebaseTodoFile.- Parameters:
repo- aRepositoryobject.
-
-
Method Detail
-
readRebaseTodo
public List<RebaseTodoLine> readRebaseTodo(String path, boolean includeComments) throws IOException
Read a file formatted like the git-rebase-todo file. The "done" file is also formatted like the git-rebase-todo file. These files can be found in .git/rebase-merge/ or .git/rebase-append/ folders.- Parameters:
path- path to the file relative to the repository's git-dir. E.g. "rebase-merge/git-rebase-todo" or "rebase-append/done"includeComments-trueif also comments should be reported- Returns:
- the list of steps
- Throws:
IOException
-
writeRebaseTodoFile
public void writeRebaseTodoFile(String path, List<RebaseTodoLine> steps, boolean append) throws IOException
Write a file formatted like a git-rebase-todo file.- Parameters:
path- path to the file relative to the repository's git-dir. E.g. "rebase-merge/git-rebase-todo" or "rebase-append/done"steps- the steps to be writtenappend- whether to append to an existing file or to write a new file- Throws:
IOException
-
-