Purpose
-------
Validate the branch mutation primitives in ``oct.core.git`` added in
Phase 4F (G-F1): ``create_branch``, ``switch_branch``,
``create_and_switch_branch``, ``branch_exists``, and ``list_branches``.
Responsibilities
----------------
- Confirm branch creation, switching, and atomic create-and-switch.
- Confirm ``branch_exists`` returns correct booleans.
- Confirm ``list_branches`` returns local (and optionally remote) names.
- Confirm error cases raise ``GitCommandError``.
Diagnostics
-----------
Domain: CORE-TESTS
Levels:
L2 -- test lifecycle
L3 -- per-case setup
L4 -- fine-grained assertions
Contracts
---------
- Tests never write outside of ``tmp_path`` / pytest-managed temp dirs.
- Tests that require a real ``git`` binary are skipped via the
``git_repo`` fixture when git is missing.