fix: prevent .beads/redirect from being committed (GH#814)
- Add redirect to GitignoreTemplate with explanatory comment - Add redirect to requiredPatterns for outdated gitignore detection - Add CheckRedirectNotTracked() to detect already-tracked redirect files - Add FixRedirectTracking() to untrack via git rm --cached - Register check in bd doctor under Git Integration category - Add 6 tests for the new functionality The redirect file contains a relative path that only works in the original worktree. When committed, it causes warnings in other clones: "Warning: redirect target does not exist" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -412,9 +412,9 @@ func runDiagnostics(path string) doctorResult {
|
||||
result.Checks = append(result.Checks, issuesTrackingCheck)
|
||||
// Don't fail overall check for tracking issues, just warn
|
||||
|
||||
// Check 14b: Redirect file not tracked (worktree support)
|
||||
redirectCheck := convertWithCategory(doctor.CheckRedirectNotTracked(), doctor.CategoryGit)
|
||||
result.Checks = append(result.Checks, redirectCheck)
|
||||
// Check 14b: redirect file tracking (worktree redirect files shouldn't be committed)
|
||||
redirectTrackingCheck := convertWithCategory(doctor.CheckRedirectNotTracked(), doctor.CategoryGit)
|
||||
result.Checks = append(result.Checks, redirectTrackingCheck)
|
||||
// Don't fail overall check for redirect tracking, just warn
|
||||
|
||||
// Check 15: Git merge driver configuration
|
||||
|
||||
Reference in New Issue
Block a user