fix: Support both canonical and legacy JSONL filenames in merge driver check
The mergeDriverInstalled() function was only checking for the legacy "beads.jsonl" filename, but installMergeDriver() writes the canonical "issues.jsonl" filename. This caused false negatives where users with the correct canonical configuration would be incorrectly flagged as "not installed", potentially triggering unnecessary reinstalls. Changes: - Update mergeDriverInstalled() to check for both filenames - Add test for canonical issues.jsonl filename detection - Ensure existing correct configs are not unnecessarily overwritten This fixes the inconsistency found during code review of bd-3sz0. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -776,9 +776,12 @@ func mergeDriverInstalled() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// Look for beads JSONL merge attribute
|
||||
return strings.Contains(string(content), ".beads/beads.jsonl") &&
|
||||
// Look for beads JSONL merge attribute (either canonical or legacy filename)
|
||||
hasCanonical := strings.Contains(string(content), ".beads/issues.jsonl") &&
|
||||
strings.Contains(string(content), "merge=beads")
|
||||
hasLegacy := strings.Contains(string(content), ".beads/beads.jsonl") &&
|
||||
strings.Contains(string(content), "merge=beads")
|
||||
return hasCanonical || hasLegacy
|
||||
}
|
||||
|
||||
// installMergeDriver configures git to use bd merge for JSONL files
|
||||
|
||||
Reference in New Issue
Block a user