import type { PatternRule } from './types.mts'; /** * Why a git command breaks the given rules, or null. Each rule reads one simple command: the span * after `git` stops at `|`, `;`, `&`, and newline, so a flag on a piped or chained command * (`git commit -F msg | tail -n 20`) is not a git flag. A command substitution's own separators * are blanked first, so `git push origin $(git branch --show-current | head -1) --force` is one * command. */ export declare function findBlockedPatternReason(command: string, rules: readonly PatternRule[]): string | null; /** * Why a script sets a git config key the rules forbid, or null. Reads the unblanked script, since * the key lives inside the quotes; `git commit -m "core.hooksPath=x"` is a message, not an override. */ export declare function findBlockedConfigReason(script: string, rules: readonly PatternRule[]): string | null; export declare const PLAIN_FORCE_PUSH_REASON = "Force pushes are banned by repository policy."; /** * The generic git-hygiene bans, as an opt-in preset for `CommandPolicy.gitPatterns`: plain force * pushes, amends, ours/theirs strategies, and every way to skip git hooks. Each reason is * overridable; `pullRebaseReason` is the only one a repository usually rewrites, to name its own * rebase script. */ export declare function standardGitPatterns(reasons?: { forcePush?: string; pullRebase?: string; }): PatternRule[];