Option C Tools
Loading...
Searching...
No Matches
oct_git.py File Reference

Go to the source code of this file.

Namespaces

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

Functions

 oct.git.oct_git.git (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)
 oct.git.oct_git.git_status_cmd (ctx, json_mode, no_check, scope)
 oct.git.oct_git.git_check_cmd (ctx, staged_only, check_all, include_tests, fix, profile, json_mode, 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)
 oct.git.oct_git.git_init_cmd (ctx, dry_run, github, no_hooks)
 oct.git.oct_git.git_commit_cmd (ctx, messages, force_commit, no_verify, profile, json_mode, ignore_unstaged_mutation, 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)
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_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)
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)
 oct.git.oct_git.git_branch_cmd (ctx, create_name, switch_name, 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)
 oct.git.oct_git.git_add_cmd (ctx, paths, patch_mode, update_mode, all_mode, dry_run, 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)
 oct.git.oct_git.git_restore_cmd (ctx, paths, staged_mode, all_mode, skip_prompt, json_mode)
 oct.git.oct_git.git_ignore_cmd (ctx, patterns, remove_pattern, list_mode, scope, json_mode)
None oct.git.oct_git.git_commit_msg_cmd (click.Context ctx, Path message_file, bool json_mode)
 oct.git.oct_git.hooks_group (ctx)
 oct.git.oct_git.hooks_install_cmd (ctx, force)
 oct.git.oct_git.hooks_status_cmd (ctx)
 oct.git.oct_git.hooks_remove_cmd (ctx)
 oct.git.oct_git.git_changelog_cmd (ctx, version, since, dry_run, 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)
dict|None oct.git.oct_git._load_octrc (Path root)
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._GITATTRIBUTES_DEFAULTS
str oct.git.oct_git._GITHUB_WORKFLOW_TEMPLATE
str oct.git.oct_git._ENHANCED_HOOKS_TEMPLATE
tuple oct.git.oct_git._OCT_HOOK_IDS