Fixes #1298 When sync-branch is configured, findJSONLPath() returns the worktree path due to GH#1103. This causes CommitToSyncBranch to receive a jsonlPath that is already inside the worktree, making the sync attempt to copy the file to itself: - srcPath = repo/.git/beads-worktrees/sync/.beads/issues.jsonl - dstPath = repo/.git/beads-worktrees/sync/.beads/issues.jsonl Since srcPath == dstPath, the file was being copied to itself, resulting in no changes detected and "No changes to commit" even when there were uncommitted modifications in the worktree. The fix adds an early return in SyncJSONLToWorktreeWithOptions when the source and destination paths are identical, since the file is already in place and no sync is needed. Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| gitdir.go | ||
| jujutsu_test.go | ||
| worktree.go | ||
| worktree_test.go | ||