Remove outdated --resolve-collisions documentation (flag removed in v0.20.1)
This commit is contained in:
68
AGENTS.md
68
AGENTS.md
@@ -198,10 +198,10 @@ bd rename-prefix kw- --json # Apply rename
|
|||||||
# Restore compacted issue from git history
|
# Restore compacted issue from git history
|
||||||
bd restore <id> # View full history at time of compaction
|
bd restore <id> # View full history at time of compaction
|
||||||
|
|
||||||
# Import with collision detection
|
# Import issues from JSONL
|
||||||
bd import -i .beads/issues.jsonl --dry-run # Preview only
|
bd import -i .beads/issues.jsonl --dry-run # Preview changes
|
||||||
bd import -i .beads/issues.jsonl --resolve-collisions # Auto-resolve
|
bd import -i .beads/issues.jsonl # Import and update issues
|
||||||
bd import -i .beads/issues.jsonl --resolve-collisions --dedupe-after # Auto-resolve + detect duplicates
|
bd import -i .beads/issues.jsonl --dedupe-after # Import + detect duplicates
|
||||||
|
|
||||||
# Find and merge duplicate issues
|
# Find and merge duplicate issues
|
||||||
bd duplicates # Show all duplicates
|
bd duplicates # Show all duplicates
|
||||||
@@ -379,8 +379,8 @@ bd duplicates --auto-merge
|
|||||||
# Preview what would be merged
|
# Preview what would be merged
|
||||||
bd duplicates --dry-run
|
bd duplicates --dry-run
|
||||||
|
|
||||||
# During import (after collision resolution)
|
# During import
|
||||||
bd import -i issues.jsonl --resolve-collisions --dedupe-after
|
bd import -i issues.jsonl --dedupe-after
|
||||||
```
|
```
|
||||||
|
|
||||||
**Detection strategies:**
|
**Detection strategies:**
|
||||||
@@ -565,42 +565,30 @@ bd automatically detects when you're in a worktree and shows a prominent warning
|
|||||||
**Why It Matters:**
|
**Why It Matters:**
|
||||||
The daemon maintains its own view of the current working directory and git state. When multiple worktrees share the same `.beads` database, the daemon may commit changes intended for one branch to a different branch, leading to confusion and incorrect git history.
|
The daemon maintains its own view of the current working directory and git state. When multiple worktrees share the same `.beads` database, the daemon may commit changes intended for one branch to a different branch, leading to confusion and incorrect git history.
|
||||||
|
|
||||||
### Handling Import Collisions
|
### Handling Git Merge Conflicts
|
||||||
|
|
||||||
When merging branches or pulling changes, you may encounter ID collisions (same ID, different content). bd detects and safely handles these:
|
**With hash-based IDs (v0.20.1+), ID collisions are eliminated!** Different issues get different hash IDs, so most git merges succeed cleanly.
|
||||||
|
|
||||||
**Check for collisions after merge:**
|
**When git merge conflicts occur:**
|
||||||
|
Git conflicts in `.beads/beads.jsonl` happen when the same issue is modified on both branches (different timestamps/fields). This is a **same-issue update conflict**, not an ID collision.
|
||||||
|
|
||||||
|
**Resolution:**
|
||||||
```bash
|
```bash
|
||||||
# After git merge or pull
|
# After git merge creates conflict
|
||||||
bd import -i .beads/issues.jsonl --dry-run
|
git checkout --theirs .beads/beads.jsonl # Accept remote version
|
||||||
|
# OR
|
||||||
|
git checkout --ours .beads/beads.jsonl # Keep local version
|
||||||
|
# OR manually resolve in editor
|
||||||
|
|
||||||
# Output shows:
|
# Import the resolved JSONL
|
||||||
# === Collision Detection Report ===
|
bd import -i .beads/beads.jsonl
|
||||||
# Exact matches (idempotent): 15
|
|
||||||
# New issues: 5
|
# Commit the merge
|
||||||
# COLLISIONS DETECTED: 3
|
git add .beads/beads.jsonl
|
||||||
#
|
git commit
|
||||||
# Colliding issues:
|
|
||||||
# bd-10: Fix authentication (conflicting fields: [title, priority])
|
|
||||||
# bd-12: Add feature (conflicting fields: [description, status])
|
|
||||||
```
|
```
|
||||||
|
|
||||||
**Resolve collisions automatically:**
|
**bd automatically handles updates** - same ID with different content is a normal update operation. No special flags needed.
|
||||||
```bash
|
|
||||||
# Let bd resolve collisions by remapping incoming issues to new IDs
|
|
||||||
bd import -i .beads/issues.jsonl --resolve-collisions
|
|
||||||
|
|
||||||
# bd will:
|
|
||||||
# - Keep existing issues unchanged
|
|
||||||
# - Assign new IDs to colliding issues (bd-25, bd-26, etc.)
|
|
||||||
# - Update ALL text references and dependencies automatically
|
|
||||||
# - Report the remapping with reference counts
|
|
||||||
```
|
|
||||||
|
|
||||||
**Important**: The `--resolve-collisions` flag is safe and recommended for branch merges. It preserves the existing database and only renumbers the incoming colliding issues. All text mentions like "see bd-10" and dependency links are automatically updated to use the new IDs.
|
|
||||||
|
|
||||||
**Manual resolution** (alternative):
|
|
||||||
If you prefer manual control, resolve the Git conflict in `.beads/issues.jsonl` directly, then import normally without `--resolve-collisions`.
|
|
||||||
|
|
||||||
### Advanced: Intelligent Merge Tools
|
### Advanced: Intelligent Merge Tools
|
||||||
|
|
||||||
@@ -612,9 +600,7 @@ For Git merge conflicts in `.beads/issues.jsonl`, consider using **[beads-merge]
|
|||||||
- Leaves remaining conflicts for manual resolution
|
- Leaves remaining conflicts for manual resolution
|
||||||
- Works as a Git/jujutsu merge driver
|
- Works as a Git/jujutsu merge driver
|
||||||
|
|
||||||
**Two types of conflicts, two tools:**
|
**Beads-merge** helps with intelligent field-level merging during git merge. After resolving, just `bd import` to update your database.
|
||||||
- **Git merge conflicts** (same issue modified in two branches) → Use beads-merge during git merge
|
|
||||||
- **ID collisions** (different issues with same ID) → Use `bd import --resolve-collisions` after merge
|
|
||||||
|
|
||||||
## Current Project Status
|
## Current Project Status
|
||||||
|
|
||||||
@@ -717,8 +703,8 @@ rm .beads/.exclusive-lock
|
|||||||
- Use `--no-auto-flush` or `--no-auto-import` to disable automatic sync if needed
|
- Use `--no-auto-flush` or `--no-auto-import` to disable automatic sync if needed
|
||||||
- Use `bd dep tree` to understand complex dependencies
|
- Use `bd dep tree` to understand complex dependencies
|
||||||
- Priority 0-1 issues are usually more important than 2-4
|
- Priority 0-1 issues are usually more important than 2-4
|
||||||
- Use `--dry-run` to preview import collisions before resolving
|
- Use `--dry-run` to preview import changes before applying
|
||||||
- Use `--resolve-collisions` for safe automatic branch merges
|
- Hash IDs eliminate collisions - same ID with different content is a normal update
|
||||||
- Use `--id` flag with `bd create` to partition ID space for parallel workers (e.g., `worker1-100`, `worker2-500`)
|
- Use `--id` flag with `bd create` to partition ID space for parallel workers (e.g., `worker1-100`, `worker2-500`)
|
||||||
|
|
||||||
## Building and Testing
|
## Building and Testing
|
||||||
|
|||||||
Reference in New Issue
Block a user