(content)
| 1655 | } |
| 1656 | |
| 1657 | function buildSyntheticCreatePatch(content) { |
| 1658 | return [ |
| 1659 | { |
| 1660 | oldStart: 0, |
| 1661 | oldLines: 0, |
| 1662 | newStart: 1, |
| 1663 | newLines: String(content).split('\n').length, |
| 1664 | lines: String(content) |
| 1665 | .split('\n') |
| 1666 | .map(line => `+${line}`), |
| 1667 | }, |
| 1668 | ] |
| 1669 | } |
| 1670 | |
| 1671 | function isFileEditLike(value) { |
| 1672 | if (!value || typeof value !== 'object' || Array.isArray(value)) { |