fix: remove gitignore negations that override fork protection (#796)
The negation patterns (!issues.jsonl, !interactions.jsonl, etc.) in .beads/.gitignore had higher precedence than the fork protection exclusion in .git/info/exclude, effectively defeating fork protection. Contributors could accidentally stage and commit upstream issue databases because: 1. Fork protection added .beads/issues.jsonl to .git/info/exclude 2. .beads/.gitignore had !issues.jsonl which overrode the exclusion 3. .gitignore files have higher precedence than .git/info/exclude The negation patterns were unnecessary anyway since no pattern in .beads/.gitignore matches those files. Added a comment explaining why negations should not be added. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -129,7 +129,7 @@ func TestInitCommand(t *testing.T) {
|
||||
"beads.base.jsonl",
|
||||
"beads.left.jsonl",
|
||||
"beads.right.jsonl",
|
||||
"!issues.jsonl",
|
||||
"Do NOT add negation patterns", // Comment explaining fork protection
|
||||
}
|
||||
for _, pattern := range expectedPatterns {
|
||||
if !strings.Contains(gitignoreStr, pattern) {
|
||||
|
||||
Reference in New Issue
Block a user