feat: add doctor check for issues.jsonl git tracking (GH#796)

Safeguard for users with global gitignore patterns like *.jsonl that
could cause issues.jsonl to be ignored, breaking bd sync.

The check runs git check-ignore and warns if issues.jsonl would be
ignored by any gitignore rule (global, parent directory, etc).
This commit is contained in:
Steve Yegge
2025-12-29 20:58:17 -08:00
parent 61edfafe4c
commit 2b90f51d0c
2 changed files with 51 additions and 0 deletions

View File

@@ -401,6 +401,11 @@ func runDiagnostics(path string) doctorResult {
result.Checks = append(result.Checks, gitignoreCheck)
// Don't fail overall check for gitignore, just warn
// Check 14a: issues.jsonl tracking (catches global gitignore conflicts)
issuesTrackingCheck := convertWithCategory(doctor.CheckIssuesTracking(), doctor.CategoryGit)
result.Checks = append(result.Checks, issuesTrackingCheck)
// Don't fail overall check for tracking issues, just warn
// Check 15: Git merge driver configuration
mergeDriverCheck := convertWithCategory(doctor.CheckMergeDriver(path), doctor.CategoryGit)
result.Checks = append(result.Checks, mergeDriverCheck)