fix: code review improvements for GH#870
Review findings addressed: 1. Fixed HasSyncBranchGitignoreFlags() - now correctly returns (hasAnyFlag, hasSkipWorktree) since skip-worktree takes precedence in git ls-files -v 2. Added interactions.jsonl to list of files to hide (was only issues.jsonl) 3. Added idempotency check - skips setting flags if already set (checks for S) 4. Made output conditional - only prints when flags actually changed 5. Fixed addToGitExclude() pattern matching - now uses exact line match instead of substring to prevent false positives 6. Refactored to use setGitIndexFlags() helper to reduce duplication 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Executed-By: beads/crew/dave Rig: beads Role: crew
This commit is contained in:
@@ -310,7 +310,7 @@ func CheckSyncBranchGitignore() DoctorCheck {
|
||||
}
|
||||
}
|
||||
|
||||
hasAssumeUnchanged, hasSkipWorktree, err := fix.HasSyncBranchGitignoreFlags(cwd)
|
||||
hasAnyFlag, _, err := fix.HasSyncBranchGitignoreFlags(cwd)
|
||||
if err != nil {
|
||||
return DoctorCheck{
|
||||
Name: "Sync Branch Gitignore",
|
||||
@@ -320,7 +320,7 @@ func CheckSyncBranchGitignore() DoctorCheck {
|
||||
}
|
||||
}
|
||||
|
||||
if hasAssumeUnchanged || hasSkipWorktree {
|
||||
if hasAnyFlag {
|
||||
return DoctorCheck{
|
||||
Name: "Sync Branch Gitignore",
|
||||
Status: StatusOK,
|
||||
|
||||
Reference in New Issue
Block a user