1 parent 7dbf2ea commit 4428de9Copy full SHA for 4428de9
1 file changed
src/patch/apply.js
@@ -85,10 +85,6 @@ export function applyPatch(source, uniDiff, options = {}) {
85
toPos = hunk.oldStart + hunk.offset + diffOffset - 1;
86
diffOffset += hunk.newLines - hunk.oldLines;
87
88
- if (toPos < 0) { // Creating a new file
89
- toPos = 0;
90
- }
91
-
92
for (let j = 0; j < hunk.lines.length; j++) {
93
let line = hunk.lines[j],
94
operation = (line.length > 0 ? line[0] : ' '),
0 commit comments