class documentation

class DiskRebaseStateManager:

Constructor: DiskRebaseStateManager(path)

View In Hierarchy

Manages rebase state on disk using same files as C Git.

Method __init__ Initialize disk rebase state manager.
Method clean Clean up rebase state files.
Method exists Check if rebase state exists.
Method load Load rebase state from disk.
Method load_todo Load the interactive rebase todo list.
Method save Save rebase state to disk.
Method save_todo Save the interactive rebase todo list.
Instance Variable path Undocumented
Method _read_file Read content from a file in the rebase directory.
Method _write_file Write content to a file in the rebase directory.
def __init__(self, path: str):

Initialize disk rebase state manager.

Parameters
path:strPath to the rebase-merge directory
def clean(self):

Clean up rebase state files.

def exists(self) -> bool:

Check if rebase state exists.

def load(self) -> tuple[bytes | None, Ref | None, ObjectID | None, list[Commit], list[Commit]]:

Load rebase state from disk.

def load_todo(self) -> RebaseTodo | None:

Load the interactive rebase todo list.

Returns
RebaseTodo | NoneRebaseTodo object or None if no todo file exists
def save(self, original_head: bytes | None, rebasing_branch: Ref | None, onto: ObjectID | None, todo: list[Commit], done: list[Commit]):

Save rebase state to disk.

def save_todo(self, todo: RebaseTodo):

Save the interactive rebase todo list.

Parameters
todo:RebaseTodoThe RebaseTodo object to save
path =

Undocumented

def _read_file(self, name: str) -> bytes | None:

Read content from a file in the rebase directory.

def _write_file(self, name: str, content: bytes):

Write content to a file in the rebase directory.