Show file diffs

= How Do I Show Changes to a Single File for a Single Commit? =

CVS
Unlike the previous recipe, this is something that CVS is perfectly capable of. If the revision you're interested in is a trunk revision, say 1.10, then you just need to compare it with its predecessor:

cvs diff -r 1.9 -r 1.10

If the revision in question is along a branch (1.x.y.z), finding its predecessor is a smidge more difficult. In particular, if it's the first revision on the branch (1.x.y.1), then you need to chop off the last two components of the revision number to get the trunk revision which preceded it:

cvs diff -r 1.9 -r 1.9.2.1

git
This is the same as the previous recipe, just adding the filename to the command line:

git-diff ~1

Of course, since commits span the whole tree, you can list multiple files and/or directories.

Subversion
As with git, you just add the filename to the command line from the previous recipe:

svn diff -r :

And likewise, you can list multiple files and/or directories