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:
@@ -64,14 +64,14 @@ func syncBranchCommitAndPush(ctx context.Context, store storage.Storage, autoPus
|
||||
}
|
||||
|
||||
// Sync JSONL file to worktree
|
||||
// Use hardcoded relative path since JSONL is always at .beads/issues.jsonl
|
||||
jsonlRelPath := filepath.Join(".beads", "issues.jsonl")
|
||||
// Use hardcoded relative path since JSONL is always at .beads/beads.jsonl
|
||||
jsonlRelPath := filepath.Join(".beads", "beads.jsonl")
|
||||
if err := wtMgr.SyncJSONLToWorktree(worktreePath, jsonlRelPath); err != nil {
|
||||
return false, fmt.Errorf("failed to sync JSONL to worktree: %w", err)
|
||||
}
|
||||
|
||||
// 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)
|
||||
if err != nil {
|
||||
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)
|
||||
|
||||
// Copy JSONL back to main repo
|
||||
worktreeJSONLPath := filepath.Join(worktreePath, ".beads", "issues.jsonl")
|
||||
mainJSONLPath := filepath.Join(repoRoot, ".beads", "issues.jsonl")
|
||||
worktreeJSONLPath := filepath.Join(worktreePath, ".beads", "beads.jsonl")
|
||||
mainJSONLPath := filepath.Join(repoRoot, ".beads", "beads.jsonl")
|
||||
|
||||
// Check if worktree JSONL exists
|
||||
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 {
|
||||
fmt.Fprintf(os.Stderr, "Error: Automatic merge failed: %v\n\n", err)
|
||||
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 --theirs .beads/issues.jsonl && bd import -i .beads/issues.jsonl\n\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/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")
|
||||
os.Exit(1)
|
||||
}
|
||||
@@ -430,8 +430,8 @@ func checkUncommittedChanges(filePath string, result *ImportResult) {
|
||||
// Get line counts for context
|
||||
workingTreeLines := countLines(filePath)
|
||||
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)
|
||||
if headLines > 0 {
|
||||
fmt.Fprintf(os.Stderr, " Git HEAD: %d lines\n", headLines)
|
||||
|
||||
Reference in New Issue
Block a user