Skip to content

Commit 801c155

Browse files
committed
Fix patch application using 3-way merge and include unstaged changes
1 parent e222d20 commit 801c155

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,9 +650,9 @@ ipcMain.handle("apply-session-to-project", async (_event, sessionId: string) =>
650650
// Write patch to temp file
651651
fs.writeFileSync(patchPath, patchContent);
652652

653-
// Apply patch to original project directory
653+
// Apply patch to original project directory using 3-way merge
654654
try {
655-
await execAsync(`git apply "${patchPath}"`, { cwd: projectDir });
655+
await execAsync(`git apply --3way "${patchPath}"`, { cwd: projectDir });
656656

657657
// Clean up patch file on success
658658
fs.unlinkSync(patchPath);

0 commit comments

Comments
 (0)