fix(gsd): skip current milestone in syncWorktreeStateBack to prevent merge conflicts
syncWorktreeStateBack copied all milestone directories including the one being merged. This caused dirty-tree conflicts when mergeMilestoneToMain ran because the files already existed from the copy-back. Now skips the current milestoneId in the sync loop since its files are already in the milestone branch being merged. Closes #3641 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b4c6229360
commit
16b61a7789
1 changed files with 3 additions and 0 deletions
|
|
@ -770,6 +770,9 @@ export function syncWorktreeStateBack(
|
|||
.map((d) => d.name);
|
||||
|
||||
for (const mid of wtMilestones) {
|
||||
// Skip the current milestone being merged — its files are already in the
|
||||
// milestone branch and would conflict with the squash merge (#3641).
|
||||
if (mid === milestoneId) continue;
|
||||
syncMilestoneDir(wtGsd, mainGsd, mid, synced);
|
||||
}
|
||||
} catch (err) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue