comparison src/diff.c @ 14726:655f00c29c58 v8.1.0375

patch 8.1.0375: cannot use diff mode with Cygwin diff.exe commit https://github.com/vim/vim/commit/3b8defd0a52fc1276816608e7bb24b628ab14c2e Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 13 13:03:11 2018 +0200 patch 8.1.0375: cannot use diff mode with Cygwin diff.exe Problem: Cannot use diff mode with Cygwin diff.exe. (Igor Forca) Solution: Skip over unrecognized lines in the diff output.
author Christian Brabandt <cb@256bit.org>
date Thu, 13 Sep 2018 13:15:06 +0200
parents 973d3f4d8017
children 193471015e1a
comparison
equal deleted inserted replaced
14725:211895f44016 14726:655f00c29c58
1598 && (tag_fgets(linebuf, LBUFLEN, fd) == 0) 1598 && (tag_fgets(linebuf, LBUFLEN, fd) == 0)
1599 && (STRNCMP(line, "+++ ", 4) == 0) 1599 && (STRNCMP(line, "+++ ", 4) == 0)
1600 && (tag_fgets(linebuf, LBUFLEN, fd) == 0) 1600 && (tag_fgets(linebuf, LBUFLEN, fd) == 0)
1601 && (STRNCMP(line, "@@ ", 3) == 0)) 1601 && (STRNCMP(line, "@@ ", 3) == 0))
1602 diffstyle = DIFF_UNIFIED; 1602 diffstyle = DIFF_UNIFIED;
1603 else
1604 // Format not recognized yet, skip over this line. Cygwin diff
1605 // may put a warning at the start of the file.
1606 continue;
1603 } 1607 }
1604 1608
1605 if (diffstyle == DIFF_ED) 1609 if (diffstyle == DIFF_ED)
1606 { 1610 {
1607 if (!isdigit(*line)) 1611 if (!isdigit(*line))