fix(fork-protection): only apply protection to actual beads forks (#823) (#828)

The fork protection logic incorrectly treated all repos where
origin != steveyegge/beads as forks, including user's own projects
that just use beads as a tool.

Changes:
- Add isForkOfBeads() that scans ALL remotes for steveyegge/beads
- Only apply protection when a beads-related remote exists
- Add git config opt-out: `git config beads.fork-protection false`
  (per-clone, never tracked, matches beads.role pattern)

Test coverage for 8 scenarios plus edge cases for config values.
This commit is contained in:
Peter Chanthamynavong
2026-01-01 10:51:22 -08:00
committed by GitHub
parent 00d0eb0192
commit f3f713d77a
3 changed files with 268 additions and 5 deletions

View File

@@ -38,8 +38,8 @@ var YamlOnlyKeys = map[string]bool{
// Git settings
"git.author": true,
"git.no-gpg-sign": true,
"no-push": true,
"no-git-ops": true, // Disable git ops in bd prime session close protocol (GH#593)
"no-push": true,
"no-git-ops": true, // Disable git ops in bd prime session close protocol (GH#593)
// Sync settings
"sync-branch": true,