Interface SequenceEngine
public interface SequenceEngine
What a backend has to do for
Sequencer: apply one commit to the index and the working tree, commit the index, and
go back. Everything else (the queue, the state that survives a restart, continue, skip, abort) is shared.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordstatic final record -
Method Summary
Modifier and TypeMethodDescriptionbooleanApplies the changes of the commit (cherry-pick) or their opposite (revert) to the index and the working tree without committing.voidRemoves the files that a cherry-pick or revert leaves in.git(CHERRY_PICK_HEAD,REVERT_HEAD,MERGE_MSG).commit(String message, SequenceEngine.Author author) Commits what is staged with this message;authoris null for the current identity.gitDir()The.gitfolder; the state of a series is kept in a folder of its own inside it.head()The commit HEAD points to, or null in a repository without commits.The commit for a name or id, with what is needed to repeat or undo it; throws aGitExceptionif there is none.voidMoves the branch and the working tree to the commit and discards all changes (reset --hard).
-
Method Details
-
gitDir
Path gitDir()The.gitfolder; the state of a series is kept in a folder of its own inside it. -
head
String head()The commit HEAD points to, or null in a repository without commits. -
meta
The commit for a name or id, with what is needed to repeat or undo it; throws aGitExceptionif there is none. -
apply
Applies the changes of the commit (cherry-pick) or their opposite (revert) to the index and the working tree without committing.mainlineis 0 for a commit with one parent.- Returns:
- true when it applied cleanly, false when there are conflicts (the files carry them)
- Throws:
io.github.jbastgen.stemma.git.api.GitException- if local changes would be overwritten or it fails otherwise
-
commit
Commits what is staged with this message;authoris null for the current identity. Returns the new commit id. -
resetHard
Moves the branch and the working tree to the commit and discards all changes (reset --hard). -
clearMarkers
void clearMarkers()Removes the files that a cherry-pick or revert leaves in.git(CHERRY_PICK_HEAD,REVERT_HEAD,MERGE_MSG).
-