The `git-branch-delete` pattern in `src/hooks/src/hooks/dangerous-actions/patterns.ts` (line 110) is `/\bgit\s+branch\s+-D\b/` — it only matches the literal uppercase combined flag `-D`. It misses equivalent force-delete forms like `git branch -d -f`, `git branch -fd`, and `git branch --delete --force`, all of which force-delete an unmerged branch just like `-D`.
Other destructive-pattern entries in the same file (`rm -rf`, `git push --force`) deliberately use permutation-tolerant matching for flag reordering/combination, but this one doesn't follow that convention. `src/hooks/tests/dangerous-actions.test.ts` (~lines 785-804) only tests the literal `-D` form. Where: `src/hooks/src/hooks/dangerous-actions/patterns.ts`.
The `git-branch-delete` pattern in `src/hooks/src/hooks/dangerous-actions/patterns.ts` (line 110) is `/\bgit\s+branch\s+-D\b/` — it only matches the literal uppercase combined flag `-D`. It misses equivalent force-delete forms like `git branch -d -f`, `git branch -fd`, and `git branch --delete --force`, all of which force-delete an unmerged branch just like `-D`.
Other destructive-pattern entries in the same file (`rm -rf`, `git push --force`) deliberately use permutation-tolerant matching for flag reordering/combination, but this one doesn't follow that convention. `src/hooks/tests/dangerous-actions.test.ts` (~lines 785-804) only tests the literal `-D` form. Where: `src/hooks/src/hooks/dangerous-actions/patterns.ts`.