Skip to content

Commit 80599a4

Browse files
committed
Add the --recount option to the git apply command for more reliable patch application
1 parent b7d5a9e commit 80599a4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/vscode/src/commands/apply-chat-response-command/utils/patch-handler.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ export async function apply_git_patch(
215215
let used_fallback = false
216216
try {
217217
await execAsync(
218-
'git apply --whitespace=fix --ignore-whitespace ' + temp_file,
218+
'git apply --whitespace=fix --ignore-whitespace --recount ' +
219+
temp_file,
219220
{
220221
cwd: workspace_path
221222
}

0 commit comments

Comments
 (0)