Prevent diff from checking for newline at end of file
Fresh3 days ago
Mar 15, 202634760 viewsConfidence Score0%
0%
Problem
I have two big trees, which I want to compare. Some of the files in the tree differ just because one has newline at the end, and the other file lacks this newline. I want to ignore this fact. I have tried calling like this: And this is working. My problem is that it also ignores other differences (…
Error Output
diff --ignore-all-space -r <dir1> <dir2>
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: Prevent diff from checking for newline at end of file
Low Risk
You basically need to compare two files, conditionally ignoring the trailing byte. There isn't a 'diff' option to do this -- but there are a number of ways it could be done (e.g, hex diff comes to mind as well.) To use 'diff', you basically have to …
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix