10.3 Patch 系统
10.3.1 patch/index.ts:Diff 补丁的生成与应用
补丁格式
*** Begin Patch
*** Add File: path/to/new-file.ts
+line 1 of new file
+line 2 of new file
*** Delete File: path/to/old-file.ts
*** Update File: path/to/existing.ts
@@ context line
-old line to remove
+new line to add
unchanged line
*** End PatchHunk 类型
补丁解析
模糊匹配应用
替换应用
10.3.2 apply_patch 工具的实现细节
Last updated
