httk.core.docs.gitsite

Create the single orphan commit used by a generated documentation site.

Exceptions

GitSiteError

Raised when a generated site cannot be committed to a Git repository.

GitUnavailableError

Raised when the git executable is not available.

Classes

CommitSiteResult

Summary of a site commit operation.

Functions

commit_site(→ CommitSiteResult)

Replace branch with one parentless commit containing site_directory.

Module Contents

exception httk.core.docs.gitsite.GitSiteError[source]

Bases: RuntimeError

Raised when a generated site cannot be committed to a Git repository.

exception httk.core.docs.gitsite.GitUnavailableError[source]

Bases: GitSiteError

Raised when the git executable is not available.

class httk.core.docs.gitsite.CommitSiteResult[source]

Summary of a site commit operation.

repository: pathlib.Path[source]
branch: str[source]
commit: str[source]
tree: str[source]
httk.core.docs.gitsite.commit_site(site_directory: str | pathlib.Path, branch: str, message: str, *, repository: str | pathlib.Path | None = None, author_name: str | None = None, author_email: str | None = None, committer_name: str | None = None, committer_email: str | None = None) CommitSiteResult[source]

Replace branch with one parentless commit containing site_directory.

The site is converted directly into Git objects, so the caller’s index and checked-out files are not changed. Ref leases for concurrent publishers remain the caller’s responsibility when pushing the resulting branch. Git dates remain ambient, so commit IDs are intentionally not deterministic.