oct
Loading...
Searching...
No Matches
oct_git.py File Reference

Go to the source code of this file.

Classes

class  oct.git.oct_git.FanoutGateOutcome

Namespaces

namespace  oct
namespace  oct.git
namespace  oct.git.oct_git

Functions

None oct.git.oct_git.git (click.Context ctx)
tuple[bool, list[str]] oct.git.oct_git._quick_check_file (Path path, Path project_root)
str oct.git.oct_git._badge (bool|None compliant)
bool oct.git.oct_git._is_within_project (Path path, Path project_root_resolved)
 oct.git.oct_git._maybe_load_workspace (Path root)
dict oct.git.oct_git._build_workspace_view (*, workspace, list[Path] staged, list[Path] modified, list[Path] untracked, bool no_check)
list[Path] oct.git.oct_git._get_untracked_files (Path root)
list[Path] oct.git.oct_git._get_modified_unstaged (Path root)
tuple[int, int] oct.git.oct_git._get_ahead_behind (Path root)
None oct.git.oct_git.git_status_cmd (click.Context ctx, bool json_mode, bool no_check, str|None scope)
int oct.git.oct_git._git_check_fanout (click.Context ctx, *, workspace, str scope, str|None cli_profile, str fallback_profile, str|None branch, bool include_tests, bool fix, bool json_mode)
None oct.git.oct_git.git_check_cmd (click.Context ctx, bool staged_only, bool check_all, bool include_tests, bool fix, str|None profile, bool json_mode, bool sandbox)
list[str] oct.git.oct_git._merge_ignore_file (Path path, tuple[str,...] entries, bool dry_run)
list[str] oct.git.oct_git._create_gitattributes (Path root, bool dry_run)
bool oct.git.oct_git._generate_github_workflow (Path root, bool dry_run)
None oct.git.oct_git.git_init_cmd (click.Context ctx, bool dry_run, bool github, bool no_hooks)
None oct.git.oct_git.git_commit_cmd (click.Context ctx, tuple[str,...] messages, bool force_commit, bool no_verify, str|None profile, bool json_mode, bool ignore_unstaged_mutation, tuple[str,...] extra_args)
None oct.git.oct_git._emit_commit_json (ctx, *, int exit_code, str message, str|None branch, str profile, list[str]|None errors=None, list|None secrets=None)
None oct.git.oct_git._populate_commit_audit (ctx, *, str|None branch, int exit_code, bool checks_passed, int staged_count, bool secrets=False, int lint_v=0, int format_v=0, list[str]|None tracked_mutations=None, list[dict]|None per_subproject_results=None)
dict[str, list[Path]] oct.git.oct_git._group_files_by_subproject (list[Path] staged, workspace)
FanoutGateOutcome oct.git.oct_git._run_fanout_gate (workspace, list[Path] files, *, str|None cli_profile, str|None branch, str fallback_profile, bool include_tests=False, bool apply_policy=True)
str oct.git.oct_git._resolve_subproject_profile (subproject, dict|None sp_octrc, str|None cli_override, str|None branch)
 oct.git.oct_git._merge_quality_gate_results (dict[str, "QualityGateResult"] per_sp)
list[dict] oct.git.oct_git._build_per_subproject_audit (dict per_sp_results, dict per_sp_meta)
str oct.git.oct_git._resolve_observe_method (dict|None octrc)
str oct.git.oct_git._resolve_observe_mode (dict|None octrc, bool ignore_unstaged_mutation)
str|None oct.git.oct_git._safe_relative (Path path, Path root)
list[str] oct.git.oct_git._check_unstaged_mutation (Path root, dict[str, str] pre_snapshot, list[Path] staged, str stage_label, str method="hash")
None oct.git.oct_git._emit_observer_block (ctx, *, list[str] mutations, str message, str|None branch, str profile, bool json_mode, int staged_count)
None oct.git.oct_git._advisory_checks (Path root, list[Path] staged, str message, bool err=True)
None oct.git.oct_git.git_branch_cmd (click.Context ctx, str|None create_name, str|None switch_name, bool json_mode)
None oct.git.oct_git._emit_branch_json (*, str operation="", str branch="", int exit_code=0, list[str]|None errors=None)
None oct.git.oct_git._branch_audit (click.Context ctx, *, int exit_code, str branch="")
None oct.git.oct_git._emit_add_json (*, str operation, list[str] paths_staged, list[dict] paths_skipped, dict|None post_check, int exit_code, list[str]|None errors=None)
None oct.git.oct_git._add_audit (click.Context ctx, *, int exit_code, int staged_count=0)
dict|None oct.git.oct_git._post_check_summary (Path root, dict|None octrc)
None oct.git.oct_git.git_add_cmd (click.Context ctx, tuple[str,...] paths, bool patch_mode, bool update_mode, bool all_mode, bool dry_run, bool json_mode)
None oct.git.oct_git._print_post_check_advisory (dict|None post)
None oct.git.oct_git._emit_ignore_json (*, str operation, list[str]|None patterns_added=None, list[str]|None patterns_removed=None, list[str]|None oct_managed=None, list[str]|None other=None, int exit_code=0, list[str]|None errors=None)
None oct.git.oct_git._ignore_audit (click.Context ctx, *, int exit_code)
str oct.git.oct_git._resolve_ignore_scope (str|None cli_scope, dict|None octrc)
tuple[Path|None, str|None] oct.git.oct_git._resolve_ignore_target_dir (*, Path project_root, Path repo_root, str scope)
None oct.git.oct_git._restore_audit (click.Context ctx, *, int exit_code)
None oct.git.oct_git.git_restore_cmd (click.Context ctx, tuple[str,...] paths, bool staged_mode, bool all_mode, bool skip_prompt, bool json_mode)
None oct.git.oct_git.git_ignore_cmd (click.Context ctx, tuple[str,...] patterns, str|None remove_pattern, bool list_mode, str|None scope, bool json_mode)
None oct.git.oct_git.git_commit_msg_cmd (click.Context ctx, Path message_file, bool json_mode)
None oct.git.oct_git.hooks_group (click.Context ctx)
None oct.git.oct_git.hooks_install_cmd (click.Context ctx, bool force)
None oct.git.oct_git.hooks_status_cmd (click.Context ctx)
None oct.git.oct_git.hooks_remove_cmd (click.Context ctx)
None oct.git.oct_git.git_changelog_cmd (click.Context ctx, str|None version, str|None since, bool dry_run, bool json_mode)
Path oct.git.oct_git._require_git_repo (Path root)
list[tuple[str, int]] oct.git.oct_git._check_large_staged_files (Path root, list[Path] staged, dict|None octrc)
bool oct.git.oct_git._should_auto_branch (str|None branch, dict|None octrc)
str oct.git.oct_git._deduplicate_branch_name (Path root, str name)
str|None oct.git.oct_git._auto_branch_for_commit (Path root, str original_branch, str message, click.Context ctx, bool json_mode)

Variables

int oct.git.oct_git._LARGE_FILE_THRESHOLD_BYTES = 10 * 1024 * 1024
tuple oct.git.oct_git._FANOUT_FIX_REFUSAL
tuple oct.git.oct_git._GITATTRIBUTES_DEFAULTS
str oct.git.oct_git._GITHUB_WORKFLOW_TEMPLATE
str oct.git.oct_git.UNSCOPED_BUCKET = "__unscoped__"
 oct.git.oct_git.no_glob_expansion
str oct.git.oct_git._ENHANCED_HOOKS_TEMPLATE
tuple oct.git.oct_git._OCT_HOOK_IDS