3 ms·
A lot of people have mentioned ugly diffs when lines are considered the basic unit of granularity, often giving examples that are much cleaner if words are cons
by wnoise 15y ago
A lot of people have mentioned ugly diffs when lines are considered the basic unit of granularity, often giving examples that are much cleaner if words are considered fundamental (e.g. latex, or lists of files in makefiles). But there are many tools that can handle word-based diffs, and most have options to change what's considered a word.
git diff can use --word-diff(=color) and --word-diff-regex=...
There is also the venerable "wdiff" program.
I've only found one program that can do "word patches" though: "wiggle" http://freecode.com/projects/wiggle http://freecode.com/projects/wiggle . It works well, though I've found the interface to be slightly confusing. But turning it into a git diff and merge driver isn't that hard.
- michaelfeathers 15y agoI just want diffs at method scope. Show me the methods that have been added, changed, or deleted. Use line diffs for things external to methods.