Remove legacy issues.jsonl and update defaults to beads.jsonl
Amp-Thread-ID: https://ampcode.com/threads/T-ae11b392-24b5-4060-b431-606dd81c1763 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -1,8 +0,0 @@
|
|||||||
This file has been renamed to prevent confusion.
|
|
||||||
The canonical JSONL file is: .beads/beads.jsonl
|
|
||||||
|
|
||||||
This file (issues.jsonl) was the original name but kept reappearing
|
|
||||||
like a zombie despite multiple attempts to remove it.
|
|
||||||
|
|
||||||
DO NOT USE THIS FILE.
|
|
||||||
Use .beads/beads.jsonl instead.
|
|
||||||
@@ -64,14 +64,14 @@ func syncBranchCommitAndPush(ctx context.Context, store storage.Storage, autoPus
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Sync JSONL file to worktree
|
// Sync JSONL file to worktree
|
||||||
// Use hardcoded relative path since JSONL is always at .beads/issues.jsonl
|
// Use hardcoded relative path since JSONL is always at .beads/beads.jsonl
|
||||||
jsonlRelPath := filepath.Join(".beads", "issues.jsonl")
|
jsonlRelPath := filepath.Join(".beads", "beads.jsonl")
|
||||||
if err := wtMgr.SyncJSONLToWorktree(worktreePath, jsonlRelPath); err != nil {
|
if err := wtMgr.SyncJSONLToWorktree(worktreePath, jsonlRelPath); err != nil {
|
||||||
return false, fmt.Errorf("failed to sync JSONL to worktree: %w", err)
|
return false, fmt.Errorf("failed to sync JSONL to worktree: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for changes in worktree
|
// Check for changes in worktree
|
||||||
worktreeJSONLPath := filepath.Join(worktreePath, ".beads", "issues.jsonl")
|
worktreeJSONLPath := filepath.Join(worktreePath, ".beads", "beads.jsonl")
|
||||||
hasChanges, err := gitHasChangesInWorktree(ctx, worktreePath, worktreeJSONLPath)
|
hasChanges, err := gitHasChangesInWorktree(ctx, worktreePath, worktreeJSONLPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, fmt.Errorf("failed to check for changes in worktree: %w", err)
|
return false, fmt.Errorf("failed to check for changes in worktree: %w", err)
|
||||||
@@ -226,8 +226,8 @@ func syncBranchPull(ctx context.Context, store storage.Storage, log daemonLogger
|
|||||||
log.log("Pulled sync branch %s", syncBranch)
|
log.log("Pulled sync branch %s", syncBranch)
|
||||||
|
|
||||||
// Copy JSONL back to main repo
|
// Copy JSONL back to main repo
|
||||||
worktreeJSONLPath := filepath.Join(worktreePath, ".beads", "issues.jsonl")
|
worktreeJSONLPath := filepath.Join(worktreePath, ".beads", "beads.jsonl")
|
||||||
mainJSONLPath := filepath.Join(repoRoot, ".beads", "issues.jsonl")
|
mainJSONLPath := filepath.Join(repoRoot, ".beads", "beads.jsonl")
|
||||||
|
|
||||||
// Check if worktree JSONL exists
|
// Check if worktree JSONL exists
|
||||||
if _, err := os.Stat(worktreeJSONLPath); os.IsNotExist(err) {
|
if _, err := os.Stat(worktreeJSONLPath); os.IsNotExist(err) {
|
||||||
|
|||||||
@@ -118,8 +118,8 @@ NOTE: Import requires direct database access and does not work with daemon mode.
|
|||||||
if err := attemptAutoMerge(input); err != nil {
|
if err := attemptAutoMerge(input); err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "Error: Automatic merge failed: %v\n\n", err)
|
fmt.Fprintf(os.Stderr, "Error: Automatic merge failed: %v\n\n", err)
|
||||||
fmt.Fprintf(os.Stderr, "To resolve manually:\n")
|
fmt.Fprintf(os.Stderr, "To resolve manually:\n")
|
||||||
fmt.Fprintf(os.Stderr, " git checkout --ours .beads/issues.jsonl && bd import -i .beads/issues.jsonl\n")
|
fmt.Fprintf(os.Stderr, " git checkout --ours .beads/beads.jsonl && bd import -i .beads/beads.jsonl\n")
|
||||||
fmt.Fprintf(os.Stderr, " git checkout --theirs .beads/issues.jsonl && bd import -i .beads/issues.jsonl\n\n")
|
fmt.Fprintf(os.Stderr, " git checkout --theirs .beads/beads.jsonl && bd import -i .beads/beads.jsonl\n\n")
|
||||||
fmt.Fprintf(os.Stderr, "For advanced field-level merging, see: https://github.com/neongreen/mono/tree/main/beads-merge\n")
|
fmt.Fprintf(os.Stderr, "For advanced field-level merging, see: https://github.com/neongreen/mono/tree/main/beads-merge\n")
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
@@ -430,8 +430,8 @@ func checkUncommittedChanges(filePath string, result *ImportResult) {
|
|||||||
// Get line counts for context
|
// Get line counts for context
|
||||||
workingTreeLines := countLines(filePath)
|
workingTreeLines := countLines(filePath)
|
||||||
headLines := countLinesInGitHEAD(filePath, workDir)
|
headLines := countLinesInGitHEAD(filePath, workDir)
|
||||||
|
|
||||||
fmt.Fprintf(os.Stderr, "\n⚠️ Warning: .beads/issues.jsonl has uncommitted changes\n")
|
fmt.Fprintf(os.Stderr, "\n⚠️ Warning: %s has uncommitted changes\n", filePath)
|
||||||
fmt.Fprintf(os.Stderr, " Working tree: %d lines\n", workingTreeLines)
|
fmt.Fprintf(os.Stderr, " Working tree: %d lines\n", workingTreeLines)
|
||||||
if headLines > 0 {
|
if headLines > 0 {
|
||||||
fmt.Fprintf(os.Stderr, " Git HEAD: %d lines\n", headLines)
|
fmt.Fprintf(os.Stderr, " Git HEAD: %d lines\n", headLines)
|
||||||
|
|||||||
@@ -242,8 +242,8 @@ func FindJSONLPath(dbPath string) string {
|
|||||||
return matches[0]
|
return matches[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default to issues.jsonl
|
// Default to beads.jsonl
|
||||||
return filepath.Join(dbDir, "issues.jsonl")
|
return filepath.Join(dbDir, "beads.jsonl")
|
||||||
}
|
}
|
||||||
|
|
||||||
// DatabaseInfo contains information about a discovered beads database
|
// DatabaseInfo contains information about a discovered beads database
|
||||||
|
|||||||
Reference in New Issue
Block a user