git_dag.git_repository.RegexParser

class git_dag.git_repository.RegexParser[source]

Bases: object

Regex parser for files associated with git objects.

Note

All this is quite ad hoc.

Methods

parse_commit_info

Parse a commit object file (read with git cat-file -p).

parse_object_descriptor

Parse an object descriptor with format SHA OBJECT_TYPE.

parse_stash_info

Parse stash info as returned by GitCommand.get_stash_info().

parse_tag_info

Parse a tag object file (read using git cat-file -p).

parse_tree_info

Parse a tree object file (read with cat-file -p).

static parse_commit_info(data: list[str]) dict[str, str | list[str]][source]

Parse a commit object file (read with git cat-file -p).

static parse_object_descriptor(string: str) dict[str, str][source]

Parse an object descriptor with format SHA OBJECT_TYPE.

static parse_stash_info(data: list[str] | None) list[dict[str, str]][source]

Parse stash info as returned by GitCommand.get_stash_info().

static parse_tag_info(data: list[str]) dict[str, str][source]

Parse a tag object file (read using git cat-file -p).

static parse_tree_info(data: list[str] | None = None) list[dict[str, str]][source]

Parse a tree object file (read with cat-file -p).