[phobos] A note on github and diffs

Jonathan M Davis jmdavisProg at gmx.com
Sun Feb 27 20:02:56 PST 2011


I just thought that I'd point this out in case it's of any use to anyone, but 
I've found that the fact that github's diffs can't be made to ignore whitespace 
(as far as I can tell anyway) and can't be made to show only the pieces of a 
line that have changed (as far as I can tell anyway), if you're dealing with a 
diff with a lot of changes in it, it would probably be worth your time to just 
get copy of the old version of the file and a copy of the new version of the file 
on your local machine and use a good diff program to look at them (kdiff3 seems to 
work quite well for those using KDE, but I'm sure that there are plenty of other 
good diff tools out there).

The recent changes to std.algorithm, std.range, etc. that Andrei created a pull 
request for look really long and nasty when looking on github, and it's a bit of 
a chore wading through them, figuring out what exactly changed. Whereas it's very 
clear in kdiff3, and most of the changes are quite small. So, looking at the 
changes in kdiff3 works _much_ better than looking on github. I wish I had 
realized that and started out by looking at them in kdiff3 rather than on github.

So, while it's fantastic that github lists diffs like it does, in many cases, it 
just doesn't cut it, and I would advise using a decent diff tool which actually 
will show you _what_ on a line changed rather than insisting on just marking the 
whole line. It could save you a fair bit of time and pain trying to sort out 
what's changed. For smaller diffs, it's likely not a big deal, but for large 
ones, it definitely makes a difference.

- Jonathan M Davis


More information about the phobos mailing list