commit f46fa9b5e78156c0360f508336dbe3dfa04b503f from: Christian Weisgerber date: Thu May 11 20:59:55 2023 UTC do not treat \r\n line endings as special Previously, we would go out of our way to handle both \n and \r\n line endings as equivalent. However, for files with \r\n line endings, this results in diffs that omit the final \r and therefore cannot be applied with patch(1) on Unix platforms. ok stsp commit - e78a8d73c23ee314fdbdf110d5c55866c9ef9680 commit + f46fa9b5e78156c0360f508336dbe3dfa04b503f blob - 8b2477047aa2fbba35eb20ce030a857b1d0c4664 blob + f44e799638f771a0588c11e3d5b6b1200b5c64f1 --- lib/diff_output.c +++ lib/diff_output.c @@ -90,13 +90,6 @@ diff_output_lines(struct diff_output_info *outinfo, FI return rc; if (ch == '\n') len--; - if (len) { - rc = get_atom_byte(&ch, atom, len - 1); - if (rc) - return rc; - if (ch == '\r') - len--; - } } for (i = 0; i < len; i++) {