Option C Tools
Loading...
Searching...
No Matches
oct.git Namespace Reference

Namespaces

namespace  audit
namespace  changelog
namespace  commit_observer
namespace  conventional
namespace  oct_git
namespace  policy
namespace  quality_gate

Functions

 __getattr__ (str name)

Detailed Description

Purpose
-------
Phase 4B ``oct git`` package: user-facing Click commands, quality-gate
orchestration, audit logging, and profile policy. Imported lazily by
:mod:`oct.cli` via :func:`git_group` so that CLI startup does not pay
the cost of loading the linter, formatter, or subprocess machinery for
non-git commands.

Responsibilities
----------------
- Expose the ``git`` Click command group for :mod:`oct.cli` registration.
- Re-export the stable public API consumed by other oct modules.

Contracts
---------
- All Click command functions go through the :func:`audited` decorator
  defined in :mod:`oct.git.audit`.
- Every read-only git state query delegates to :mod:`oct.core.git`
  (Phase 4A foundation). This module never calls ``subprocess.run``
  directly.
- No write operations land in Phase 4B — both ``oct git status`` and
  ``oct git check`` are strictly read-only. Writes come in Phase 4C/4D.

Function Documentation

◆ __getattr__()

oct.git.__getattr__ ( str name)
Lazy re-export of :data:`git_group` from :mod:`oct.git.oct_git`.

``oct.git.oct_git`` imports Click and the linter/formatter
orchestrators, which are heavy. Using ``__getattr__`` keeps those
imports deferred until :mod:`oct.cli` actually touches the group,
mirroring the pattern the existing ``diag`` package uses.

Definition at line 33 of file __init__.py.