tags:

views:

284

answers:

2

I tried running 'diff' against two source directories get a patch file with a 'diff' between the two directories.

diff -rupN flyingsaucer-R8pre2_b/ flyingsaucer-R8pre2/ > a.patch

The command above does not seem to work, it generates a diff of everything and I get a 13 MB file, when in reality, it should be a couple of changes.

A: 

I don't see any reason why it wouldn't work. Try adding "wb" to the argument list to ignore whitespace changes. Are you sure you got the trailing slashes the same on both sides?

Paul Tomblin
+4  A: 

Should work with any recent version of gnu diff (tested here with gnu diff 2.8.1.)

You might want to add -b (and perhaps -B) to ignore difference in white space which perhaps generate large patch files unnecessarily.

nimrodm
Hmm, it seems to take into account the 'directory' name/
Berlin Brown