Skip to main content

git_policy_cli/
escape_hatch.rs

1//! What:
2//!  The spellings of the wrapper-only escape hatches several modules share.
3//! Why:
4//!  A command module puts its own hatch first in the flag list it hands the option
5//!      tokenizer,
6//!  and the control table lists the same spellings;
7//!  one constant per
8//!      spelling keeps both in step.
9//!  Removal is not done here:
10//!  `wrapper_invocation.rs`
11//!      deletes wrapper tokens by the positions the tokenizer reports.
12//!
13//! In TS you'd write (pseudocode):
14//! ```ts
15//! // export const WORKTREE_ENFORCEMENT_ESCAPE_HATCH = '--no-enforce-worktree';
16//! ```
17
18/// What:
19///  Wrapper-only flag suppressing linked-worktree enforcement for one invocation.
20///       `&str` is borrowed text;
21///  here it is baked into the program.
22/// Why:
23///   `git stash`,
24///  `git clean` and `git reset` name it as their own hatch.
25///
26/// In TS you'd write (pseudocode):
27/// ```ts
28/// export const WORKTREE_ENFORCEMENT_ESCAPE_HATCH = '--no-enforce-worktree';
29/// ```
30pub const WORKTREE_ENFORCEMENT_ESCAPE_HATCH: &str = "--no-enforce-worktree";
31
32/// Wrapper-only flag skipping ignored-state synchronization into new worktrees.
33pub const WORKTREE_COPY_ESCAPE_HATCH: &str = "--no-worktree-copy";
34
35/// Wrapper-only flag suppressing worktree-first branch creation enforcement for one
36/// `branch`,
37///  `checkout` or `switch` invocation.
38pub const BRANCH_WORKTREE_ESCAPE_HATCH: &str = "--no-enforce-worktree-branch";