Replace fetchAndRebaseInWorktree with contentMergeRecovery in pushFromWorktree. The problem: When push fails due to non-fast-forward, the old code used git rebase to recover. But git rebase is text-level and does not invoke the JSONL merge driver. This could resurrect tombstones - if remote had a tombstone and local had closed, the rebase would overwrite the tombstone. The fix: Use the same content-level merge algorithm that PullFromSyncBranch uses. This respects tombstone semantics - recent tombstones always win over live issues. Changes: - Add contentMergeRecovery() that does content-level merge instead of rebase - Update pushFromWorktree to call contentMergeRecovery - Mark fetchAndRebaseInWorktree as deprecated (kept for reference) - Add tests for tombstone preservation during merge recovery 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
43 KiB
43 KiB