fix(dolt): add hook compatibility check and migration warning
Two improvements for Dolt backend users with stale git hooks: 1. Migration warning: When running 'bd migrate --to-dolt', warn if installed hooks lack the Dolt backend check and suggest reinstalling. 2. Doctor check: New CheckGitHooksDoltCompatibility() detects when hooks exist but lack the Dolt skip logic, surfacing the error with a clear fix message. Both changes help users who migrated to Dolt but have pre-migration hooks that try to run JSONL sync (which fails with Dolt backend). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -281,6 +281,13 @@ func runDiagnostics(path string) doctorResult {
|
||||
result.OverallOK = false
|
||||
}
|
||||
|
||||
// Check git hooks Dolt compatibility (hooks without Dolt check cause errors)
|
||||
doltHooksCheck := convertWithCategory(doctor.CheckGitHooksDoltCompatibility(path), doctor.CategoryGit)
|
||||
result.Checks = append(result.Checks, doltHooksCheck)
|
||||
if doltHooksCheck.Status == statusError {
|
||||
result.OverallOK = false
|
||||
}
|
||||
|
||||
// If no .beads/, skip remaining checks
|
||||
if installCheck.Status != statusOK {
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user