hermes: allow --force-with-lease in the approvals deny rules #29
Loading…
Reference in a new issue
No description provided.
Delete branch "chore/allow-force-with-lease"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The
git push --force*fnmatch glob swallowed--force-with-leasetoo (fnmatch*spans everything, including the-with-leasesuffix), so the safe-lease rebase pushes were blocked alongside bare force-pushes.What changes
[!-]-gated variants deny--force/-fbare or followed by a non-dash char —--force-with-lease(next char always-) no longer matches.git push*variants catch flags placed after other arguments (git push origin main --force), which a prefix-anchored rule would miss.git push*+*rule denies refspec-level forced updates (git push origin +main), which the old glob never covered.Verified
fnmatch.fnmatchcaseover per-segment normalized command variants (tools/approval_floors.py) — rule set tested against 14 real command spellings: all force spellings denied,--force-with-leaseand plain pushes pass.nix evaloffreun-devtoplevel drvPath succeeds.The 'git push --force*' fnmatch glob swallowed --force-with-lease too (fnmatch '*' spans everything, including the '-with-lease' suffix), so the safe-lease rebase pushes were blocked alongside bare force-pushes. Replace it with [!-]-gated variants: a dash class denies --force/-f bare or followed by a non-dash char, while --force-with-lease (next char always '-') no longer matches. 'git push*' variants catch flags placed after other arguments. 'git push*+*' additionally denies refspec-level forced updates ('git push origin +main').66e7272a64a1ca595e63a1ca595e63ebc463748b