-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
It looks like there may be a breaking change in the latest version of GNU's diff utilities:
https://savannah.gnu.org/news/?id=10720
I've had some issues with vim-dirdiff after a Git update on Windows:
> "C:\Program Files\Git\usr\bin\diff.exe" -r --brief "left" "right"
Files 'left\main.cpp' and 'right\main.cpp' differ
> diff -r --brief "left" "right"
Files left\main.cpp and right\main.cpp differ
> "C:\Program Files\Git\usr\bin\diff.exe" -v
diff (GNU diffutils) 3.11
...
>diff -v
diff (GNU diffutils) 2.8.7
...
There are some new ' ' characters around the filenames in the diff window. Everything is failing to open downstream of that in the vimscript.
It looks like this may be the problem:
** Improvements
Programs now quote file names more consistently in diagnostics.
For example; "cmp 'none of' /etc/passwd" now might output
"cmp: EOF on ‘none of’ which is empty" instead of outputting
"cmp: EOF on none of which is empty". In diagnostic messages
that traditionally omit quotes and where backward compatibility
seems to be important, programs continue to omit quotes unless
a file name contains shell metacharacters, in which case programs
use shell quoting. For example, although diff continues to output
"Only in a: b" as before for most file names, it now outputs
"Only in 'a: b': 'c: d'" instead of "Only in a: b: c: d" because the
file names 'a: b' and 'c: d' contain spaces. For compatibility
with previous practice, diff -c and -u headers continue to quote for
C rather than for the shell.
I think some of the regexes need to be modified so they are tolerant of the old and new output formats of diff. I've only test on my Windows machine so far, but I'd guess this could happen on Linux/Mac too.
I'll see if I can come up with a PR for the regex modifications...
Metadata
Metadata
Assignees
Labels
No labels