git-fu: Visual diff with Changes.app
Thursday, August 7th, 2008The thing I miss most about Perforce is the absence of good tools for visual diff comparison. With a bit of work, you can get a reasonable approximation of this functionality using Changes.app.
First, install the Terminal Utility using the Changes drop down menu. This installs chdiff, a utility that will let you load up two files for diffing in git.
There are two good options for viewing Git diffs. The first lets you view the diffs in serial order, loading up a series of windows in Changes. To get that running you only need to set the GIT_EXTERNAL_DIFF variable to point to this script:
#!/bin/sh<br/>
[ $# -eq 7 ] && /usr/bin/env chdiff –wait “$2″ “$5″
Another option is this ruby script on 5xm.org which will check out two particular revisions to a temporary folder, and then allow you to diff the entire trees in place.
The Changes.app wiki offers some more advice on Git and other SCMs, if you’re in search of more help.


