Re:The Tyranny of the Diff
by makecheck on Sunday April 08, 2012 @03:36PM
(#3814678)
Most languages and file formats don't enforce an inherently "undiffable" layout, so it's really an issue of programming style. People tend to lazily do what's easiest to write instead of thinking about what will be easiest to read later (in "diff" or otherwise).
A common example I see is something like a one-line list of files to build in a makefile. It is certainly possible to put every file on its own line and backslash-escape each line ending, and doing so produces a very readable "diff": if someone adds a file you see "+ xyz.c" (or whatever) and that's it instead of a mangled mess of file lists repeated with one word that's different.
A common example I see is something like a one-line list of files to build in a makefile. It is certainly possible to put every file on its own line and backslash-escape each line ending, and doing so produces a very readable "diff": if someone adds a file you see "+ xyz.c" (or whatever) and that's it instead of a mangled mess of file lists repeated with one word that's different.